<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi David,<div dir="ltr"><br><blockquote type="cite">On Jul 17, 2020, at 11:46 AM, stes@PANDORA.BE <stes@telenet.be> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span></span><br><span></span><br><span>-----BEGIN PGP SIGNED MESSAGE-----</span><br><span>Hash: SHA256</span><br><span></span><br><span></span><br><span>I've noticed that in the FloatMathPlugin there is fdlibm</span><br><span>(freely distributable libm) :</span><br><span></span><br><span>platforms/Cross/plugins/FloatMathPlugin</span><br><span></span><br><span>This refers to the platforms/Cross/third-party/fdlibm</span><br><span></span><br><span>I wonder whether the VM shouldn't be using the system provided libm (-lm).</span><br><span></span><br><span>Perhaps for Croquet or other software that depends on FLoatMathPlugin,</span><br><span>see https://en.m.wikipedia.org/wiki/Croquet_Project</span><br><span>a special test framework could be ran in Squeak,</span><br><span>or perhaps as part of "./configure" configuration, to check the results,</span><br><span>of the underlying (system) libm, so that it provides results similar to fdlibm ?</span><br><span></span><br><span>Maybe fdlibm and libm "run bit identically" on some platforms.</span><br><span></span><br><span>This is because for Croquet the goal is to have the VM run bit identically.</span><br><span></span><br><span>Using the system provided -lm would possibly result in a smaller executable,</span><br><span>with less duplicated code (no overhead).</span><br><span></span><br><span>I'm no expert on libm, but perhaps the system provided libm is also faster.</span><br></div></blockquote><div><br></div>For context see <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/383#issuecomment-629095487">https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/383#issuecomment-629095487</a><div><br></div><div>What we want (I think) is either the entire vm, including the FloatMathPlugin, links against the platform’s libm, or the entire vm, including the FloatMathPlugin, links against fdlibm. I don’t see much benefit in arbitrarily mixing and matching.</div><div><br></div><div>So then we arrive at the above message. Is the default to link against the platform’s libm, requiring a Makefile to specify BIT_IDENTICAL_FLOATING_POINT to link against fdlibm, or is the default to link against fdlibm, requiring a Makefile to specify PLATFORM_SPECIFIC_FLOATING_POINT to link against the platform’s libm?</div><div><br></div><div>I agree with Marcel that the latter is preferable, by default a vm provides bit-identical floating-point, building and linking against fdlibm. For the moment we have the former.</div><div><br></div><div>Im not too concerned about core floating-point performance. I don’t think it dominates in our usage because we have other overheads, primarily primitive invocation and boxing/unboxing. Whereas I do think that the core execution engine should be perfectly cross-platform, and floating point is the one area I’m aware of where the platform percolates up. So I think we should make it an objective that the 6.0 release vm links against fdlibm.</div><div><br></div><div>What do people think?</div><div><br><blockquote type="cite"><div dir="ltr"><span></span><span>Regards,</span><br><span>David Stes</span><br></div></blockquote><br></div><div>Eliot</div><div>_,,,^..^,,,_ (phone)</div></body></html>