[Vm-dev] FFI Testing - Curiouser and curiouser!

Andres Valloud ten at smallinteger.com
Fri Feb 15 00:39:09 UTC 2019


Something doesn't look right there.  The test in question appears to be 
adding all integers from 1 to 9 as floating point numbers, and seems to 
be expecting the result is 45 as a floating point number.  That 
calculation should need no epsilons, it's lossless in floating point 
land (under the usual assumptions).  What's going on, exactly?

On 2/14/19 09:17, ken.dickey at whidbey.com wrote:
>   
> 
> 
> On 2019-02-13 18:57, Eliot Miranda wrote:
> 
>> What are the failing tests?  If they are comparing float values could 
>> it simply be a precision error that requires inexact float comparison? 
>> (e.g. (a - b) abs < epsilon)
> 
> Ah!  Yes.  That nailed it!
> Thinking.  Gotta try that next time!  Radical approach to the solution, 
> however. ;^)
> 
> Thanks for all,
> -KenD


More information about the Vm-dev mailing list