On Sat, Feb 22, 2020 at 1:06 PM 'simon place' via golang-nuts < golang-nuts@googlegroups.com> wrote:
> are you sure? > > surely floats can have, say, a small number added, that depending of the > value, sometimes doesn't change them and sometimes does. seems to me the > same issue. > > On Saturday, 22 February 2020 19:58:09 UTC, robert engels wrote: >> >> float equality is useful for determining if “something changed” >> > Yes floats have operation limitations especially when the dynamic range of a data set (scale) is large and mixed. Mix large and small floats and try simple operations like addition. The random list will have one value, sort up and down to find two different answers. Parallel computations with 1, 2, 3....many processors will have different net results depending on data in each block. Printing converts float to string is not exact. Truncating the string for display does not truncate the stored float. Comparing strings is not a comparison of the floating point data. Compilers can make transformations and depending on hardware 80 internal bits for computations all in float registers can mismatch computations that spill in and out of registers or memory. Some 32 bit computation is done in 64 bit hardware and micro code extracts the 32 bit value to store in memory, most external data data representation (xdr) works but pay attention. 80 bit floating point hardware is clever but has pitfalls. Especially with calling conventions. -- Tinny keyboard.. Mobile ... I am -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAAMy4URsz-7AvLdcNO7HNOv_S-VSCRV3mRn9qFewG9SKWMq-kA%40mail.gmail.com.