Jellyfish
More convincing I think (just using the numerator case as an example):
default
{
state_entry()
{
integer count = 10;
integer max = 100;
float fn = ((float)count / max);
if (fn == ((float)count / max))
{
llOwnerSay("They are the same");
}
else
{
llOwnerSay("They are not");
}
}
}
On LSO2:
[10:44 AM] Object: They are the same
On LSL: Mono:
[10:44 AM] Object: They are not
On LSL 2025 VM:
[10:45 AM] Object: They are not
Lucia Nightfire
I was making a progress bar for someone when I came across this.
I don't recall inline math eval having this issue in the past and it is sort of disturbing what this might be affecting.
default
{
state_entry()
{
integer count = 10;
integer max = 100;
float increment = 0.1;
float fn = ((float)count / max);
float fd = (count / (float)max);
llOwnerSay("NV1: " + (string)(fn >= increment));
llOwnerSay("NV2: " + (string)(fn >= 0.1));
llOwnerSay("NV3: " + (string)(fn >= fn));
llOwnerSay("NV4: " + (string)(fn >= fd));
llOwnerSay("NI1: " + (string)(((float)count / max) >= increment));
llOwnerSay("NI2: " + (string)(((float)count / max) >= 0.1));
llOwnerSay("NI3: " + (string)(((float)count / max) >= fn));
llOwnerSay("NI4: " + (string)(((float)count / max) >= fd));
llOwnerSay("DV1: " + (string)(fd >= increment));
llOwnerSay("DV2: " + (string)(fd >= 0.1));
llOwnerSay("DV3: " + (string)(fd >= fn));
llOwnerSay("DV4: " + (string)(fd >= fd));
llOwnerSay("DI1: " + (string)((count / (float)max) >= increment));
llOwnerSay("DI2: " + (string)((count / (float)max) >= 0.1));
llOwnerSay("DI3: " + (string)((count / (float)max) >= fn));
llOwnerSay("DI4: " + (string)((count / (float)max) >= fd));
}
}
This does not repro in LSO, but does in Mono and LSL3. IDK about Slua.