• SANE Conversion Patch

    From Stephen Heumann@21:1/5 to All on Mon Mar 27 18:07:57 2023
    I've just released a patch that fixes a bug in SANE (the Standard Apple Numerics Environment) on the IIGS. The bug is that when SANE is used
    to convert a number from a floating-point type to an integer type, it
    may give the wrong result for certain numbers. Specifically, the
    numbers that may be affected are certain negative multiples of 65536
    (e.g. -8388608, -65536000, etc).

    This is a pretty obscure issue, but I've run into it when working on
    the floating-point code in the ORCA/C libraries, so I figured I'd make
    a patch to fix it. The patch and documentation are available here:

    https://github.com/sheumann/SANEConvPatch

    The download also includes a test program that you can use to see some
    examples of the conversion errors and confirm that they are fixed after
    you apply the patch.

    --
    Stephen Heumann

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From I am Rob@21:1/5 to All on Mon Mar 27 18:31:09 2023
    I believe there was another SANE patch at one time. What did that one fix?

    And what Applications might I run into problems with, without the patch?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Heumann@21:1/5 to I am Rob on Mon Mar 27 21:16:40 2023
    On 2023-03-28 01:31:09 +0000, I am Rob said:

    I believe there was another SANE patch at one time. What did that one fix?

    There was a patch called SANE.Fix that was meant to fix a different
    SANE bug that existed in System 6.0 and earlier. That bug was fixed in
    System 6.0.1, so SANE.Fix is no longer necessary. (See my patch's
    README for some more details.)

    And what Applications might I run into problems with, without the patch?

    I'm not aware of any specific application that triggers this bug. Realistically, it's pretty unlikely that any program you use will do
    these specific conversion operations on these specific numbers (which
    is probably why nobody found and fixed the bug before).

    That said, it definitely is possible to trigger it, e.g. by doing type
    casts from floating-point to integer types in C code, and you might not
    even know if some program is giving incorrect results because of this
    issue.

    --
    Stephen Heumann

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)