I am adding a list of float below. actually they are in string have to
parse them to float then
do the addition.
"1407227.37"
"2956763.57"
"2696319.98"
"1081624.73"
"1687505.85"
"1025948.68"
"1419109.02"
"2316724.96"
"1725575.51"
"1039292.33"
"3076051.0"
"3586477.97"
"2613366.17"
"1338487.39"
"1407006.99"
"1211422.15"
"2648096.88"
"1009216.6"
"1045488.38"
"1043280.01"
"1027629.78"
"1008997.5"
"1738370.34"
"1456859.88"
"3359981.38"
"1004529.44"
"1260909.12"
"1260909.12"
"1053388.09"
"1711845.49"
"1097131.44"
"1505570.61"
"1186644.79"
"3138800.9"
"2850000.0"
"2104418.31"
"1064052.5"
"1070671.79"
"1065000.0"
"1100000.0"
"1064355.45"
here is the answer i get 6.846504e+7 which i don't understand. Anybody
can help me
understand this answer.
Thanks
George
On Thu, 07 Dec 2006 00:08:48 +0100, <······@rbv.gov.vu> wrote:
> I am adding a list of float below. actually they are in string have to
> parse them to float then
> do the addition.
>
> "1407227.37"
...
> "1100000.0"
> "1064355.45"
>
> here is the answer i get 6.846504e+7 which i don't understand. Anybody
> can help me
> understand this answer.
Seems reasonable to me. That is scientific notation.
6.846504e+7 means 6.846504 * 10^7= 6.846504 * 10000000 = 68456040
What did you use to print the value:
CL-USER 7 > (format t "~&~7F~%" (with-input-from-string (is "6.846504e+7")
(read is)))
68465040.
NIL
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
On Dec 7, 10:33 am, "John Thingstad" <··············@chello.no> wrote:
>Seems reasonable to me. That is scientific notation.
> 6.846504e+7 means 6.846504 * 10^7= 6.846504 * 10000000 = 68456040
coming from vb where all things are wraped up. it would certainly take
sometime to get the lisp way - thanks.
> What did you use to print the value:
store to a variabe call total and evaluated at repl - no wonder
>
> CL-USER 7 > (format t "~&~7F~%" (with-input-from-string (is "6.846504e+7")
thanks i'll see if i can work on a function that will convert any
scientific notation to decimal numbers using format.
Many thanks
George
In article <························@f1g2000cwa.googlegroups.com>,
······@rbv.gov.vu wrote:
> On Dec 7, 10:33 am, "John Thingstad" <··············@chello.no> wrote:
> >Seems reasonable to me. That is scientific notation.
> > 6.846504e+7 means 6.846504 * 10^7= 6.846504 * 10000000 = 68456040
>
> coming from vb where all things are wraped up. it would certainly take
> sometime to get the lisp way - thanks.
Scientific notation is hardly "the lisp way". It's been used in many,
if not most, programming languages. I started programming in 1977, and
the BASIC implementation I used had it. I'm pretty sure it was in
FORTRAN in the 50's or 60's.
--
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***