Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread Michael Jones
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

Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread Nigel Tao
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

Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread Michael Jones
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

[go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-17 Thread xiiophen
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 -