Good point. I missed that. Also, I did not mean “unsolvabe” just not solvable 
using slightly a different precision.

Common solutions:

Remove the divides by multiplying them out. Then it just works (at least in FP 
where integer precision is not such an issue as in graphics hardware)

Avoid the clipping/division tests by doing comparisons alone.

Deal with relative primality by direct means. I think I have a patent (SGI 
patent / OpenGL) about dealing with this as part of the reference polygon 
extension. There was an elaboration that resolved the “cracks at T-vertices” 
problem too, but that died with SGI.

-----Original Message-----
From: <[email protected]> on behalf of Nigel Tao <[email protected]>
Date: Wednesday, September 21, 2016 at 4:26 PM
To: Xio Fen <[email protected]>
Cc: golang-nuts <[email protected]>
Subject: Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

    On Sun, Sep 18, 2016 at 1:57 PM,  <[email protected]> wrote:
    > It looked like I would have to use pkg unsafe
    
    BTW, you don't have to use package unsafe. Use package math's
    Float32bits and Float32frombits functions.
    
    -- 
    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 [email protected].
    For more options, visit https://groups.google.com/d/optout.
    


-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to