Help me with my chemistry homework! Near the middle of the semester in chemistry, we get problems like:


  Convert 1.283850057 to Scientific Notation


and


  Convert 3.583✕106 to Standard Notation


This is just stupid busy work for people who already know how to do this. So…

The Challenge

Given an input in any reasonable, convenient format, in either standard notation or scientific notation, output the same number in the other notation. However, note that e will not be accepted in place of *10^, as this gives a significant advantage to languages with builtins with e.

If not otherwise specified, standard notation will take this format:

x             (an integer)
xxxxxxxxxx    (a large integer with no more than 10 digits)
x.xxxx        (a float)
x.xxxxxxxxxx  (a float with no more than 10 x's after the decimal point)


While scientific notation will take this format:

x*10^x
x.zzzz*10^z (x will be &gt;= 1)
x*10^-x
x.zz*10^-xx (x will be &gt;= 1)


I/O

Input will never contain more than 10 leading+10 trailing digits, and you may decide how to deal with trailing zeroes after the decimal point. The exponent will never be so large as to max out your language's allowance for large numbers. You should only need to handle up to about 1010.

input =&gt; output

---scientific to standard---

4.5*10^7 =&gt; 45000000
1*10^0 =&gt; 1
8.9*10^-2 =&gt; 0.089
1.0001*10^5 =&gt; 100010
9.999999*10^9 =&gt; 9999999000
4.00038*10^2 =&gt; 400.038

---standard to scientific---

7354 = 7.354*10^3
385.43 =&gt; 3.8543*10^2
0.32 = 3.2*10^-1
0.00044 =&gt; 4.4*10^-4
0.053 =&gt; 5.3*10^-2


As always, standard loopholes are disallowed. This is code-golf, so shortest bytes wins!
R, 70 bytes



function(s)sub("e","*10^",format(eval(parse(t=s)),sc=!grepl("\\^",s)))


Try it online!

An anonymous function. Takes input as a string and outputs as a string.

This function evaluates the string eval(parse(t=s)), then formats it, with the flag scientific set to whether the string contains a ^ or not. Then it replaces e with *10^ to match the right output spec.