Scientific Notation to Decimal Value - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Utilities (https://qb64phoenix.com/forum/forumdisplay.php?fid=8) +---- Thread: Scientific Notation to Decimal Value (/showthread.php?tid=1583) |
Scientific Notation to Decimal Value - Dimster - 03-26-2023 I'm interested in knowing if there might be a different way to recalculate Scientific Notation into a decimal value. Here is the method I'm presently using which works ok with Single dimension arrays/variables but when the resultant value is zero I've been going back are Redim to Double or whatever can get me a decimal value other than zero. Code: (Select All) ' Removing Scientific Notation from a Variable/Array of Single dimension RE: Scientific Notation to Decimal Value - Jack - 03-26-2023 I don't understand, is it for displaying values without sci notation? if so, then why not use Print Using ? if what you want is a fixed-point representation of a value in a string then I would use the C sprintf function RE: Scientific Notation to Decimal Value - bplus - 03-26-2023 Code: (Select All) N = 115 / 123456 RE: Scientific Notation to Decimal Value - vince - 03-26-2023 nice use of Steve's N2S$, bplus RE: Scientific Notation to Decimal Value - Dimster - 03-27-2023 Hi bplus .. thanks for the routine, it will likely solve my problem of a zero result. I see where there is a ReDim of 1 as long. How does dimensioning "1 as long" fit into the overall scheme of determining if a result is expressed in Scientific Notation? Isn't a value of 1 by it's nature a Single? I don't think I have seen that before and wonder if it may have other applications. RE: Scientific Notation to Decimal Value - bplus - 03-27-2023 That's an "l" as in lucky not a 1 as in "one thing". |