aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/floattypes_todo.txt
blob: ab1a98ba09908c0a4cc630674a9826448a4d1aec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Which floating point types to have?

- embedded systems might not have any fpu (might want to not link in softfpu support)
- some optimizations might be possible in fp-free code
  (perhaps fp registers can be clobbered)
- fast vs IEEE float
  (fast = no denormals, inf, NaN, signed zero, etc)
  (fast mode might not be available!)
- do "destructive signalling" floats allow optimizations?
- should there be separate fp types for trapping vs. giving NaN on error?
  floats with NaN could be considered a "?float" type.


Option 1:
module header options: nofloat, nodouble, ieeefloat, fastfloat

 float	= 32 bit
 double = 64 bit

Option 2:
different types + module header options to enable/disable?

 ffloat    = fast ~32 bit float
 fdouble   = fast ~64 bit float
 flongdouble = fast ~80-128 bit float
 stdfloat  = 32 bit IEEE bin-float32
 stddouble = 64 bit IEEE bin-float64

Option 3:
different types + module header options to enable/disable?

 ffloat16    = fast ~32 bit float
 ffloat32    = fast ~32 bit float
 ffloat64    = fast ~64 bit float
 ffloat80    = fast ~80 bit float
 ffloat128    = fast ~128 bit float
 stdfloat32  = 32 bit IEEE bin-float32
 stddoubl64 = 64 bit IEEE bin-float64

...