* compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
This commit is contained in:
parent
a8b3e7c059
commit
cf0cf32d27
21 changed files with 286 additions and 199 deletions
|
|
@ -161,16 +161,15 @@ template fn() =
|
|||
doAssert b[2].signbit
|
||||
doAssert not b[3].signbit
|
||||
|
||||
when defined(nimFpRoundtrips):
|
||||
block: # bug #15397, bug #13196
|
||||
let a = 0.1
|
||||
let x = 0.12345678901234567890123456789
|
||||
let b = (a + 0.2, 0.3, x)
|
||||
testRoundtripVal(b): "[0.30000000000000004,0.3,0.12345678901234568]"
|
||||
block: # bug #15397, bug #13196
|
||||
let a = 0.1
|
||||
let x = 0.12345678901234567890123456789
|
||||
let b = (a + 0.2, 0.3, x)
|
||||
testRoundtripVal(b): "[0.30000000000000004,0.3,0.12345678901234568]"
|
||||
|
||||
testRoundtripVal(0.12345678901234567890123456789): "0.12345678901234568"
|
||||
testRoundtripVal(epsilon(float64)): "2.220446049250313e-16"
|
||||
testRoundtripVal(1.0 + epsilon(float64)): "1.0000000000000002"
|
||||
testRoundtripVal(0.12345678901234567890123456789): "0.12345678901234568"
|
||||
testRoundtripVal(epsilon(float64)): "2.220446049250313e-16"
|
||||
testRoundtripVal(1.0 + epsilon(float64)): "1.0000000000000002"
|
||||
|
||||
block: # case object
|
||||
type Foo = object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue