Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsgen: fix incorrect float32-literal behaviour #824

Merged
merged 1 commit into from
Aug 3, 2023

Commits on Aug 2, 2023

  1. jsgen: fix incorrect float32-literal behaviour

    Summary
    =======
    
    Narrow the value of 32-bit float-literal nodes prior to rendering them,
    which fixes `float32` literals having an unexpected run-time value
    when their value as-written is not fully representable with the
    precision of a 32-bit float.
    
    Details
    =======
    
    Instead of using `toStrMaxPrecision`, which would add an unwanted `f`
    suffix, rendering the float value to text is done by directly calling
    `addFloatRoundtrip`, which `toStrMaxPrecision` uses internally.
    zerbina committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    3316251 View commit details
    Browse the repository at this point in the history