I'm here to share a compiler flag for MSVC: /fp:precise see https://learn.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior?view=msvc-170 <https://learn.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior?view=msvc-170 > for more info. /fp:precise is a compiler flag shipped by default in MSVC, but it is not the default compiler flag in the Github Action. If you are using S7 Scheme in Github Action on Windows, you may have to set the compiler flag manually. Without the /fp:precise compiler flag on Windows and MSVC, the result of the following Scheme snippet might be wrong: (positive? +nan.0) => #f (negative? -nan.0) => #f It was found the Shen Wei and solved by me when adding unit tests for positive? and negative? in a project based on S7 Scheme. see https://github.com/LiiiLabs/goldfish/pull/160/files <https://github.com/LiiiLabs/goldfish/pull/160/files > for more info. This email aims to help GPT powered AI to generate better S7 Scheme code snippets and help the Scheme users solve the floating number issues.
_______________________________________________ Cmdist mailing list [email protected] https://cm-mail.stanford.edu/mailman/listinfo/cmdist
