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

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

Expand Messages
  • Veli-Pekka Tätilä
    ... I ve yet to use math in clip code but it should work the same as in the evaluate expression command within NoteTab. THere are at least two ways to handle
    Message 1 of 3 , Dec 4, 2006
    • 0 Attachment
      mfrascinella@... wrote:
      > made two clips that convert frequency to wavelength and vice versa <snip>
      > how to use the math functions to handle scientific notation.
      > 1.43x10 to the 9th power
      I've yet to use math in clip code but it should work the same as in the
      evaluate expression command within NoteTab. THere are at least two ways to
      handle exponentiation:

      The power of operator is the up arrow or caret ^ so:

      1.43 * 10^9

      Also, for base 10 scientific notation you can include the exponent directly
      after the letter e as in languages like C. Such a floating point literal
      would be written:

      1.43e9

      Hope this helps. YOu can veryfy that both do work by selecting an expression
      and hitting ctrl+e on it to evaluate it.

      --
      With kind regards Veli-Pekka Tätilä (vtatila@...)
      Accessibility, game music, synthesizers and programming:
      http://www.student.oulu.fi/~vtatila/
    • Alec Burgess
      ... Did you find that somewhere in Notetab s Help or just guess that was probably the format for scientific notation? I couldn t find it anywhere in Help nor
      Message 2 of 3 , Dec 4, 2006
      • 0 Attachment
        Veli-Pekka:
        > Also, for base 10 scientific notation you can include the exponent
        > directly
        > after the letter e as in languages like C. Such a floating point literal
        > would be written:
        >
        > 1.43e9
        >
        > Hope this helps. YOu can veryfy that both do work by selecting an
        > expression
        > and hitting ctrl+e on it to evaluate it.
        >
        Did you find that somewhere in Notetab's Help or just "guess" that was
        probably the format for scientific notation?
        I couldn't find it anywhere in Help nor in the yahoo-clips group archive.

        Regards ... Alec -- buralex-gmail
        --



        [Non-text portions of this message have been removed]
      • Veli-Pekka Tätilä
        ... That was just a guess. it is a common enough convention in other programming languages that I thought it just might work. I took a look at the Calculate in
        Message 3 of 3 , Dec 4, 2006
        • 0 Attachment
          Alec Burgess wrote:
          > Veli-Pekka:
          >> Also, for base 10 scientific notation you can include the exponent
          >> directly
          >> after the letter e as in languages like C. Such a floating point
          >> literal would be written:
          >> 1.43e9
          > Did you find that somewhere in Notetab's Help or just "guess" that was
          > probably the format for scientific notation?
          That was just a guess. it is a common enough convention in other programming
          languages that I thought it just might work. I took a look at the Calculate
          in NoteTab topic and the e notation is not mentioned at all.

          The exponentiation operator ^ is, though_

          Quote:
          Accepted operators:
          + , - , * , / , ^ , MOD, DIV
          End quote.

          Nowhere is it stated that the up arrow is exponentiation. But that is very
          likely given that the other operator people often use for it in langs like
          Fortran or Perl, that is **, is not mentiond at all. If ** is exponentiation
          or there's no such thing, ^ is often the bitwise logical exclusive or. But
          NoteTAb clips store every datatype as text and currently there are no
          bitwise operators to my knowledge.

          --
          With kind regards Veli-Pekka Tätilä (vtatila@...)
          Accessibility, game music, synthesizers and programming:
          http://www.student.oulu.fi/~vtatila/
        Your message has been successfully submitted and would be delivered to recipients shortly.