- mfrascinella@... wrote:
> I imagine it would be tricky to convert the result

That depends. you could just go and divide regardless and let it give

> to scientific notation.

you the result as E9 and E12 and whatever and visually choose the one

that looks nicest. I wouldn't really want to do a thing like that in

clip language, but the canonic way, if clips can hack it, is

3*INT(LOG(x)/3) for the exponent.

Axel

N.B: full quotes are evil - This was first sent last evening, but never appeared:

mfrascinella@... wrote:> I imagine it would be tricky to convert the result

That depends. you could just go and divide regardless and let it give

> to scientific notation.

you the result as E9 and E12 and whatever and visually choose the one

that looks nicest. I wouldn't really want to do a thing like that in

clip language, but the canonic way, if clips can hack it, is

3*INT(LOG(x)/3) for the exponent.

Axel

N.B: full quotes are evil - Hi,

I did some further study, especially of the note about math functions

that Sheri referred to (from 2003) and finally got the clip to

calculate the frequency in scientific notation. I took the logarithm

of the calculated frequency, used the FLOOR function to round the log

down to an integer, and divided the result by that power of 10 to get

scientific notation.

The prompts (now commented out) helped me verify each step of the

calculation.

Yours,

Michael F.

==========

H="Wavelength -> Frequency"

^!Set %wavelength%=^?[Enter the wavelength (cm)]

;^!Prompt ^%wavelength% cm

^!Set %frequency%=^$Calc(2.9979245800e10/^%wavelength%)$

;^!Prompt ^%wavelength% cm = ^%frequency% cycles/sec.

^!Set %log_frequency%=^$Calc(FLOOR(LOG10(^%frequency%)))$

;^!Prompt ^%log_frequency%

^!Prompt ^%wavelength% cm = ^$Calc(^%frequency%/1e^%log_frequency%;3)

$ x 10^^%log_frequency% cycles/sec (scientific notation)