theft icon indicating copy to clipboard operation
theft copied to clipboard

Built-in floating point alloc functions

Open ranweiler opened this issue 7 years ago • 1 comments

Right now, theft provides theft_random_double(). This returns a double in the closed unit interval [0, 1].

What would be nice is some other floating point alloc builtins that do things like:

  • Take a user-defined range of output values
  • Produce only "bad" values with different floating-point classifications
  • Produce only arbitrary finite values
  • Produces literally any valid IEEE 754 floating-point value, at the relevant precision

ranweiler avatar Dec 29 '17 23:12 ranweiler

In particular, the naming seems important here -- theft_random_ieee754_double, for example.

theft_random_double should probably be deprecated/renamed in a future release.

silentbicycle avatar Dec 29 '17 23:12 silentbicycle