Alaska Software Inc. - scientific (exponential) notation
Username: Password:
AuthorTopic: scientific (exponential) notation
Steven Schefferscientific (exponential) notation
on Thu, 19 Aug 2021 16:25:11 +0200
Is there a function in XBase to convert a numeric scientific (exponential) notation into a numeric value? VAL() does not support conversion of scientific (exponential) notation.

0.123456789e-12
1.234567890E+34
23456789012E66
12345.6789e-3
12.12345e-3 
12.12345e-5 
12.34e-5 
4.3e-5 
12.12345e+3
12.12345e+5
12.34e+5
4.3e+5
Andreas Gehrs-Pahl
Re: scientific (exponential) notation
on Fri, 20 Aug 2021 17:57:13 -0400
Steven,

>Is there a function in XBase to convert a numeric scientific (exponential) 
>notation into a numeric value? VAL() does not support conversion of 
>scientific (exponential) notation.

No, there is no such function (that I'm aware of), but you can easily write 
your own. Some of your example values are too large or too small to be 
(accurately) represented by Xbase++ numerical values, though.

I have attached a small program that accomplishes what you want.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[L]:   https://www.LinkedIn.com/in/AndreasGehrsPahl
[F]:   https://www.FaceBook.com/AbsoluteSoftwareLLC

Expo_Val.prg
Expo_Val.prg
Steven SchefferRe: scientific (exponential) notation
on Thu, 26 Aug 2021 22:58:53 +0200
Thanks for your sample program Andreas.