Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need a Scientific Notation to real number converter
#3
(10-09-2023, 06:15 AM)random1 Wrote: Hi all
Need help with a Scientific Notation to real number converter.   Below is a mockup for testing the Function but if I do the
calculations by hand the outputs don't match.  

Thanks in advance
Maybe I'm missing the point, but here's a simple method I wrote some time back:

Input "Enter your scientific notation number"; sn$
sn$ = UCase$(sn$)
p = InStr(sn$, "E")
lft = Val(Left$(sn$, p - 1))
rt = Val(Right$(sn$, Len(sn$) - p))
Print lft, rt
dn = lft * 10 ^ rt
Print dn
Sleep
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
RE: need a Scientific Notation to real number converter - by PhilOfPerth - 10-09-2023, 08:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Maximum Number of Attachments per Thread Magdha 7 483 01-13-2026, 10:13 AM
Last Post: Magdha
  getting the number of dimensions in an array on the fly? madscijr 7 752 09-16-2025, 12:34 AM
Last Post: madscijr
  Random Number Generator pmackay 14 1,274 07-30-2025, 12:56 PM
Last Post: SMcNeill
  Illegal string-number conversion Herve 7 775 07-07-2025, 09:53 AM
Last Post: a740g
  generating a random number in the full range of that number? (Integer, Long) madscijr 2 665 05-01-2025, 09:11 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)