Hacker News

Unity vs. Floating Point

37 points by ibobev ago | 7 comments

Zarathruster |next [-]

Interesting. When I first got started with Unity I found really buggy behavior if you do any kind of physics calculations near world origin (0, 0, 0). It has a weird gravity well effect if you get too near it. I never found a satisfactory explanation for it but maybe this is it.

koolala |previous [-]

I wish JavaScript or any open-source Array Language could do Single-precision Floats. It's awesome they were able to show the assembly breakdown.

adgjlsfhk1 |root |parent |next [-]

What do you mean by Array Language? Would Julia qualify here?

koolala |root |parent [-]

I was thinking like APL, all the open ones are float64 based.

taeric |root |parent |previous [-]

I wish there was more explicit support for fixed point decimal out there.

bee_rider |root |parent |next [-]

Do you mean fixed point using integers, or actually decimal (base-10)? My gut would be to use fixed-point integers with a power of two in the denominator.

On the other hand, I’m not sure if modern compilers even bother converting division/multiplications by powers of two to shifts these days, so maybe it isn’t worth it…

koolala |root |parent |previous [-]

Speed wise no hardware can do it though.