View Issue Details

IDProjectCategoryView StatusLast Update
0031234RunnerFunctionsPublic2019-08-19 11:20
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityVery LowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version2.2.3 
Target Version2.2.4Fixed in Version2.2.4 
Summary0031234: Functions: infinity is not equal to infinity
Description
var v = infinity;
show_debug_message(v == infinity);
show_debug_message(v + 1 == infinity);
show_debug_message(v != -infinity);

Expected: 1,1,1
Have: 0,0,1

From discussion with Russell, as per IE754, infinities have a distinct bit pattern that is consistently used in overflows
https://en.wikipedia.org/wiki/Floating-point_arithmetic#Infinities

So, unless you have manually constructed an off-spec infinity value from bits, it should be equal to other infinity of the same sign.
Additional InformationCurrent behaviour is consistent between native/HTML5, which is kind of good for not having unusual behaviour.

is_infinity works as intended.
Tagsfunctions, Runner, Runtime
1.4 Found In
2.x Runtime Found In9.9,.1.1511
2.x Runtime Verified In9.9.1.1531

Activities

YellowAfterlife

2019-07-30 17:26

Developer  

infinity.yyz (61,041 bytes)

Russell Kay

2019-07-31 11:58

Manager   ~0064503

Fixed in gitlab