[racket] What math do you want to do in Racket?

From: Neil Toronto (neil.toronto at gmail.com)
Date: Wed Jul 4 13:10:53 EDT 2012

Duly noted. This has bothered me, too, because a lot of the 64-bit 
floating-point functions would be both simpler and faster if computed 
using 80 bits.

Any 80-bit or 128-bit ops that run on hardware would either have to be 
Racket primitives or be exposed by an FFI. I couldn't do the former, but 
possibly the latter.

For those precisions and larger, two years ago, I wrote an FFI wrapper 
for MPFR, an LGPL'd library for arbitrary-precision floating-point math 
with correctly rounded results. (The authors prove and publish the 
proofs of their algorithms' correctness.) Back then, it would have made 
more sense as a Planet package. With a `math' collection, it might be 
better as `math/bigfloat' - and it would also give me a good standard to 
test the 64-bit floating-point functions against.

Neil ⊥

On 07/04/2012 01:02 AM, Dmitry Pavlov wrote:
> Neil,
>
> I kept in mind to initiate a topic about it, but
> since you asked first (thanks!), I will say it now:
>
> *** I want 80 bit IEEE floating point numbers in Racket. ***
>
> Double precision (64 bit) is not always enough for scientific
> calculations. Extended precision is demanded.
>
> Is it possible to make something like "flonum"-s, bul 80-bit?
>
> More than that, in the future we will surely need 128-bit
> (quadruple precision) floating point numbers. Intel
> and GCC compilers seem to support quadruple precision
> already. They do it via emulation, but still it would be
> interesting to try that in Racket, too. I believe we
> will see real processors with 128-bit math someday.
>
> Best regards,
>
> Dmitry

Posted on the users mailing list.