cucapra/dahlia

Code generation rounding off values

Closed this issue · 5 comments

Generated code for let PI: double = 3.1415926535 rounds off to double PI = 3.1415927.

Changing the EFloat syntax node to take in Double instead of Float should fix it.

Jesus Christ. What is this mess. I’ll take a look.

That's a tricky solution, but it'll do! Nice work.

The issue with just changing the AST node to hold double was that parser was still using toFloat.

Changing that to toDouble also makes the whole thing work but we don’t inspect floating values right now so no reason to keep them in the AST.