XSLT / XPATH 2.0 split float to exponent / mantissa and find nearestengineering format

R

RolfK

Dear ALL,

I'm not sure about the most efficient method to get the mantissa and
exponent of a float in XSLT / XPATH 2.0. I must assume that the
numbers strings are not always in a E format.
E.g. +123E-9 is legal as well as -0.0002

So, what is the best and efficient way to split mantissa and exponent
and how to find the the nearest engineering format exponent.

Any help is welcome

Rolf
 
M

Mukul Gandhi

Following is my opinion about this question ...

The float value is internally stored in the computer hardware as a
mantissa and exponent components.

But the mantissa and exponents are not generally exposed to high level
languages.

I cannot find any built in functions for numeric data in XPath 2.0,
which allows us to retrieve the mantissa and exponent of float values.

Also you could notice, the java.lang.Float class has no methods to
retrieve the mantissa and exponents of the float.

I would be happy, if anybody could correct me on these points.

Regards,
Mukul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top