I haven't see the native part, but it's probably only useful for two things:

1 - Doing the final scaling by a power of ten, being able to handle very large or very small exponent values.

You could have your own lookup table for the range you need, say from 10^-20 to 10^30, and use it when the final scaling factor is within this range. This would take just one floating point multiplication.

2 - To control the rounding behavior for this scaling.

This is a pretty expensive operation on the x86, as it involves saving/setting/restoring the FPU's control flags. Probably not much better on the ARM, if this is actually done.

It's important for 3D graphics (normals, intersections), but for 2D you can probably just let it be.

-- Kostya

15.04.2011 3:47, Paul пишет:
OK, have stripped the FloatingPointParser bare, but can't run it as
the native method, parseFltImpl() is throwing an
UnsatisfiedLinkError...

Maybe a silly question, but any ideas what to do from here?


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to