Loading ...
Sorry, an error occurred while loading the content.

15846[Clip] Re: how to use scientific notation in a clip?

Expand Messages
  • frascinella
    Dec 12, 2006
    • 0 Attachment

      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


      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)
    • Show all 4 messages in this topic