Re: Scientific notation

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi Mark,

The following compound field will return the scientific notation of any +ve
value between 10^-9 and 10^9:
{QUOTE
{SET a {SourceVal}}
{SET
b{=9-(a<10^9)-(a<10^8)-(a<10^7)-(a<10^6)-(a<10^5)-(a<10^4)-(a<10^3)-(a<10^2)
-(a<10^1)-(a<10^0)-(a<10^-1)-(a<10^-2)-(a<10^-3)-(a<10^-4)-(a<10^-5)-(a<10^-
6)-(a<10^-7)-(a<10^-8)}}
{SET c{=int(a/10^b)+mod(a,10^b)/10^b}}
{c \# 0.00}E{b \# +00;-00}}
where 'SourceVal' is the input, which could be a formula taking its input
from two formfields. You can extend the range easily enough by adding more
terms.

All the field braces (i.e. { }) are created in pairs via Ctrl-F9. I've laid
the coding out with line breaks to separate the key portions of the coding,
but you don't really need them.

Cheers


"MarkTheNuke" <MarkTheNuke@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BE775318-3245-4336-B815-0AE9FC3FF542@xxxxxxxxxxxxxxxx
How do I display the results of a calculated field in scientific notation.
Is this possible. Thanks in advance.


.



Relevant Pages

  • Re: Constructor inheritance (or lack thereof)
    ... personal style of coding which is my own than any real intent to insult ... I need not bother about conventions but you pick on it as if it were the ... your misconstruing does not mean anything but mine always does! ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Code to play all formats of music files
    ... pop up a quote that can be related to my post contents:) ... What is the coding to display that, ... I use Forte Agent as my newsreader and a program called Agent Sig ...
    (comp.lang.basic.visual.misc)
  • Re: PATCH: the Arkenstone (Re: An idea for dwarf kings)
    ... Judging from the quote, and some quick wiki-fu, the Arkenstone most ... experience, though, that coding such a feature would get a bit ... gem or rock ... "The difference between false memories and true ones is the same ...
    (rec.games.roguelike.nethack)
  • Re: Unussual Problem.
    ... > I am used to coding for windows, and it never caused trouble there. ... May i quote you and put these lines into my fortune file? ...
    (comp.os.linux.development.apps)