Post Reply 
A program to toggle between prefixes
04-24-2016, 11:57 AM
Post: #10
RE: A program to toggle between prefixes
Hi Salvomic,

The scientific notation exponent on base 10 of a value could be matched with the corresponding value in an SI prefix list, and append the prefix abbreviation, or name, on returning corresponding value. I haven't coded a routine for this, but you might have some ideas to expand on this theme. Here is an SI prefix list you might find useful, (omitting 1e0, which could be the default case) :

Code:

SI:={ 1e-24,"y","yocto",
      1e-21,"z","zepto",
      1e-18,"a","atto",
      1e-15,"f","femto",
      1e-12,"p","pico",
      1e-9,"n","nano",
      1e-6,"u","micro",
      1e-3,"m","milli",
      1e-2,"c","centi",
      1e-1,"d","deci",
      1e1,"da","deca",
      1e2,"h","hecto",
      1e3,"k","kilo",
      1e6,"M","mega",
      1e9,"G","giga",
      1e12,"T","tera",
      1e15,"P","peta",
      1e18,"E","exa",
      1e21,"Z","zetta",
      1e24,"Y","yotta"
    };

-Dale-
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: A program to toggle between prefixes - DrD - 04-24-2016 11:57 AM



User(s) browsing this thread: 1 Guest(s)