Skip to content

Conversation

silveroxides
Copy link
Contributor

Due to how floating point works with rounding, setting min to -sys.maxsize and max to sys.maxsize will result in following error:

* PrimitiveFloat 969:
  - Value -9.223372036854776e+18 smaller than min of -9223372036854775807: value

The error arises because the floating-point approximation (-9.223372036854776e+18) is slightly smaller (i.e., more negative) than the precise integer value of -sys.maxsize (-9223372036854775807).

Alternative approach would be to use sys.float_info.min and sys.float_info.max instead but that range might seem a bit excessive for a primitive node.

Due to how floating point works with rounding, setting min to `-sys.maxsize` and max to `sys.maxsize` will result in following error:
```
* PrimitiveFloat 969:
  - Value -9.223372036854776e+18 smaller than min of -9223372036854775807: value
```

The error arises because the floating-point approximation (-9.223372036854776e+18) is slightly smaller (i.e., more negative) than the precise integer value of -sys.maxsize (-9223372036854775807). 

Alternative approach would be to use sys.float_info.min and sys.float_info.max instead but that range might seem a bit excessive for a primitive node.
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.

1 participant