Skip to content
This repository

Todo list for supporting floating point datatype in Red/System. The work on floats has been split in two branches, the float-partial branch has been almost finished, while the float-full branch has been postponed and not scheduled yet. The initial float support is meant for making possible the interfacing with some external libraries.

float-partial branch

  1. Loader: extend it to accept decimal! type (using REBOL's LOAD native). (was not required finally)
  2. Add definitions in compiler for recognizing float!, float32!, float64! types.
  3. Add FPU specific initialization routine (when required, like for IA-32).
  4. 64-bit support in all stack-related calculations (currently limited to 32-bit).
  5. Add support for floats in structs.
  6. Add support for floats in pointers.
  7. Add support for floats in variadic and typed functions.
  8. Write a new 'emit-operation backend function for math operations involving floats.
    1. Support float!/float! math ops.
    2. Support float32!/float32! math ops.
    3. Support float32! to float! type casting.
    4. Support float! to float32! type casting.
    5. Support integer! to float32! type casting.
    6. Support float32! to integer! type casting.
  9. Add float datatypes description to language specification document.
  10. Add float support to ARM backend.

float-full branch (not planned yet)

  1. Support mixed integers/floats math ops.
  2. Improve IA-32 float support code relying more on width instead of types testing.
  3. Add float support to stack/push and stack/pop functions.
  4. Add read/write FPU and floats settings to system structure.
  5. Provide a good Ulp-based almost-equal operator.
  6. Decide on how to handle NaN and INFs.
  7. Add type conversion routines to runtime.
  8. Add float constants to runtime.
  9. Add support for decimal! in virtual-struct library (compiler helping lib).
  10. Write enough unit tests to cover all edge cases (NaNs, INFs, +/-0.0, comparisons,...)
Something went wrong with that request. Please try again.