Skip to content

Conversation

@cbmarini
Copy link
Collaborator

@cbmarini cbmarini commented Oct 7, 2025

This fixes the bug in tokenize that lead to a crash for 0.0 as an input float:

  • 0.0, 0., .0 etc become the integer 0. Maybe this needs to become a float?
  • If there is a real 0.0 that is represented as a float_, this is now also represented with four arguments:
    float_(prec,0,0,0). Previously, this was float_(prec,0,0), but this was not a proper float according to TestFloat which expects four arguments in float_.

…n input float.

- 0.0, 0., .0 etc becomes the integer 0. Maybe this needs to become a float?
- If there is a real 0.0 that is represented as a float_, this is now also represented with four arguments:
float_(prec,0,0,0). Previously, this was float_(prec,0,0), but this was not a proper float according to TestFloat which expects four arguments in float_. This can be changed later.

test: added a test case to test all the different float zeroes.
@coveralls
Copy link

Coverage Status

coverage: 54.376% (-0.005%) from 54.381%
when pulling be32d02 on cbmarini:float-zero
into 7fa4cef on form-dev:master.

@jodavies
Copy link
Collaborator

jodavies commented Oct 7, 2025

Just to record here what we discussed on Zoom: a user-input 0.0 should be a floating zero and remain until a chop removes it, consistent with 0.0 produced by term processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants