o-nuts] truncate float32 to lesser precision (22 bit mantissa)
On Sun, Sep 18, 2016 at 1:57 PM, <xiiop...@gmail.com> 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 functio
On Sun, Sep 18, 2016 at 1:57 PM, 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
er 17, 2016 at 8:57 PM
To: golang-nuts <golang-nuts@googlegroups.com>
Subject: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)
ok I have a problem with rounding errors on floats which I think is
unavoidable. Just as specific background this is happening for me
ok I have a problem with rounding errors on floats which I think is
unavoidable. Just as specific background this is happening for me on tests
of vectors (lines) intersecting with bounding boxes (ie oblongs, axis
aligned). Two code snippets shows the core of the maths..
front_n = (x_front -