Community
Participate
Working Groups
I think all the variations should return works. program driver type BasicProgram {} function main() smallFloatn1 smallFloat? = 1.4028e6; floatn1 float? = 1.4028e56; if (smallFloatn1 isa smallfloat) syslib.writestdout("works"); else syslib.writestdout("unexpected"); end if (1.4028e6 isa smallfloat) syslib.writestdout("works"); else syslib.writestdout("unexpected"); end if (1.4028e6 isa float) syslib.writestdout("unexpected"); else syslib.writestdout("works"); end end end
Hi Kathy, This is actually working correctly. We don't have a literal syntax for smallfloats. 1.4028e6 (and every literal number with an 'e' in it) is a float not a smallfloat. You could change it to this: (1.4028e6 as smallfloat) isa smallfloat -Matt
Modified test variations