[Jprogramming] Quora Challenge

Erling Hellenäs erling at erlinghellenas.se
Tue Sep 19 17:15:49 UTC 2017


Comparison tolerance is a global setting you can turn off?
It can then be explicitly used with u!.t after verbs?
Will it cause a lot of problems with library functions? /Erling

On 2017-09-19 14:56, Raul Miller wrote:
> Hypothetically, you could rig up a 9!:n mechanism (to turn this on /
> off) and rig up the code that promotes ints to floats print a warning.
> You'd probably also want some kind of anti-spam measure in there
> (display the warning only once until the user issues another command
> line, or something iike that). Then all you need to do is test to make
> sure you haven't broken anything and deal with deploying these
> changes.
>
> But there's another way, and it's available right now:
>
>     datatype (4 : '13|x*y') / 19 29 59 79 89 109 119 139 149 179 198
> integer
>     datatype  (4 : '13|x*y') /\. 19 29 59 79 89 109 119 139 149 179 198 + 10^20
> floating
>
> If your result is floating and you meant for it to be integer, switch
> to extended and see if it changes.
>
> That said, if you're working with large numbers (if your numbers can
> ever be more than 15 digits), and this kind of precision matters for
> you, you should always be working with extended precision values.
>
> Thanks,
>



More information about the Programming mailing list