ve to
> convert to IEEE float in this case, you may want to be able to check that
> is converts into the float as you expect and then the binary representation
> may make sense.
>
> // Mike
>
> -----Original Message-
> From: Steve Lawrence
> Sent: Monday, September 25,
ransmission in error, please notify the sender immediately.
-Original Message-
From: Steve Lawrence
Sent: Monday, September 25, 2023 10:01 AM
To: dev@daffodil.apache.org
Subject: Re: Comparing Floating Point numbers
Based on what I've learned today from reading that bug, I thin
oat in this case, you may want to be able to check that is converts into
the float as you expect and then the binary representation may make sense.
// Mike
-Original Message-
From: Steve Lawrence
Sent: Monday, September 25, 2023 10:01
To: dev@daffodil.apache.org
Subject: Re: Compari
cation is strictly
> prohibited. If you have received this transmission in error, please notify
> the sender immediately.
>
> -Original Message-
> From: Steve Lawrence
> Sent: Monday, September 25, 2023 10:01 AM
> To: dev@daffodil.apache.org
> Subject: Re: Compa
.
-Original Message-
From: Steve Lawrence
Sent: Monday, September 25, 2023 10:01 AM
To: dev@daffodil.apache.org
Subject: Re: Comparing Floating Point numbers
Based on what I've learned today from reading that bug, I think in Java at
least, float -> string -> float will give you back the
age-
From: Steve Lawrence
Sent: Monday, September 25, 2023 08:07
To: dev@daffodil.apache.org
Subject: Re: Comparing Floating Point numbers
+1 for type aware comparisons. It should be a very small change to this
function:
https://github.com/apache/daffodil/blob/main/daffodil-lib/src/main/scala/org/apa
loating point
> math is a deep rabbit hole that can be followed. That is probably overkill
> for TDML.
>
> // Mike
>
> -Original Message-
> From: Steve Lawrence
> Sent: Monday, September 25, 2023 08:07
> To: dev@daffodil.apache.org
> Subject: Re: Comparing Fl
l for TDML.
// Mike
-Original Message-
From: Steve Lawrence
Sent: Monday, September 25, 2023 08:07
To: dev@daffodil.apache.org
Subject: Re: Comparing Floating Point numbers
+1 for type aware comparisons. It should be a very small change to this
function:
https://github.com/apache/daffodil
+1 for type aware comparisons. It should be a very small change to this
function:
https://github.com/apache/daffodil/blob/main/daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/XMLUtils.scala#L1098
And just need to add xsi:type to a few expected infosets that are
sensitive to the issue.
A third alternative could be to round the result and compare against the
rounded value. Epsilon is probably the better idea. I think different infosets
per JVM would be too brittle and difficult to keep up-to-date.
// Mike
-Original Message-
From: Mike Beckerle
Sent: Sunday, Septembe
10 matches
Mail list logo