Hi
when entering too large numbers for output values of a constant combinator, it silently flows over.
on entering i get the following:
1e9: 1.000.000.000
1e10: 1.410.065.408 (shown as 1.4G, probably overflown)
1e11: 1.215.752.192 (shown as 1.2G, probably overflown)
...
The biggest number I am able to enter is: 2.147.483.647
any bigger value flows over to a negative
so I guess that makes sense, as it's overflowing like a 32bit signed integer. However: I'd expect maybe a warning or silently maxing out at 2.147.483.647, instead of silently flowing over to a negative value.
kind regards
[Tobias] [2.0.9] Number value input overflow (negative/positive/large/big/combinator/integer) (MR)
Re: [2.0.9] number overflow
This overflows in user input and the behavior (unintentionally?) changed from 1.1.x, not a duplicate.
-
- Long Handed Inserter
- Posts: 69
- Joined: Sat Oct 27, 2018 11:10 pm
- Contact:
Re: [2.0.9] number overflow
This occurs also for the minimum value of a logistics request. It is also possible to just enter negative values or other expressions that evaluate to negative values. For the maximum value of a logistics request it is not possible to enter an expression. When entering a negative minimum, the value is accepted and the request is saved with a negative minimum. I'm not 100% sure if negative minimums for logistics requests are valid or not but I don't think they are. I first noticed this by trying to enter very large values and noticed that the value 1e12 results in something like -727M.
Re: [2.0.9] Number value input overflow (negative/positive/large/big/combinator/integer) (MR)
Oh that's fun. [2.0.16] When you set a logistic requester chest to "Max = 0", "Min = -50G", it does a flying text with the error message "Min (1539....) must be <= Max (0)" because the negative number clearly got converted to a positive for the error checking. However, the text on the item still says "-50G" until I close and reopen the chest GUI, after which it says "0" for both max and min. If I put in a normal negative number like "-100", there is no error message and it stays that way after reopening the GUI.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
-
- Manual Inserter
- Posts: 4
- Joined: Thu Oct 31, 2024 4:43 am
- Contact:
Re: [2.0.9] Number value input overflow (negative/positive/large/big/combinator/integer) (MR)
This has been really bugging me. Large numbers are clamped, rather than overflow, in other parts of the UI, like constants in arithmetic combinators and constants in the conditions to enable/disable machines. And I do use this to set the max or min int32 without having to remember the actual values are specifically 2147483647 and -2147483648.
But then there's constant combinators, which use logistic groups, which don't clamp large numbers and instead sign overflow.
But then there's constant combinators, which use logistic groups, which don't clamp large numbers and instead sign overflow.