You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I can see the RowReader follows this and row.float maps to F# float32 instead of float a.k.a double.
/// Gets the value of the specified column as a `System.Single` object.
member this.float(column: string) : float32 =
this.fieldValue(column)
The problem is, the change could cause even more harm than good at this point, but I would recommend:
make RowReader's floatdeprecated (with explanation that the name is ambiguous)
use the single and maybe an alias float32 to describe 32-bit floating point conversion
With this change, we would avoid the contaminated float and also make the issue more expressive for those who are not aware of the trap. What would you say?
The text was updated successfully, but these errors were encountered:
I do not know who invented this, but look:
C# – Characteristics of the floating-point types
and now look at what F# has:
F# – Basic types
So:
float
maps to F#float32
(orsingle
) andfloat
maps to C#double
. 🤯This is crazy and can cause lots of troubles.
Now, I can see the
RowReader
follows this androw.float
maps to F#float32
instead offloat
a.k.adouble
.The problem is, the change could cause even more harm than good at this point, but I would recommend:
RowReader
'sfloat
deprecated (with explanation that the name is ambiguous)single
and maybe an aliasfloat32
to describe 32-bit floating point conversionWith this change, we would avoid the contaminated
float
and also make the issue more expressive for those who are not aware of the trap. What would you say?The text was updated successfully, but these errors were encountered: