Re: read string to float



"John Thingstad" <jpthing@xxxxxxxxx> writes:

På Thu, 28 Feb 2008 17:08:45 +0100, skrev Matthias Benkard
<mulkiatsch@xxxxxxxxx>:

Hi,

i haven't looked inside the lib.. but is this significantly
different from
arbitrary-precision long floats of CLISP?

Can CLISP exactly represent the square root of 2? RealLib can.

~ Matthias

It can what? (sqrt 2) is a exact representation.

It can represent square root of 2 and any other real number. It
doesn't use (sqrt 2) as representation though.

There is no finite number of digits that can represent the whole number.

This is not totally exact.

There is not enough time in the universe to enumerate all the real
numbers. Actually the universe is finite, so we can consider only a
finite number of real numbers. These real numbers that will be
considered ever is countable and can all be represented in this
universe, by definition. Therefore there are finite number of digits
that can represent any of these whole real numbers.


You can generate arbitrary number of digits or even ask for a specific
digit.
(use binominal expansion in sum form, exponent 1/2, expansion term is
k, error term is k+1, from that determine k and extract the nth
digit, untested)

Indeed. That's something like that reallib does.

--
__Pascal Bourguignon__ http://www.informatimago.com/

"This machine is a piece of GAGH! I need dual Opteron 850
processors if I am to do battle with this code!"
.



Relevant Pages

  • Re: Forth PARANOIA
    ... Addition/Subtraction neither rounds nor chops. ... Test for sqrt monotonicity. ... "Square root is neither chopped nor correctly rounded", ...
    (comp.lang.forth)
  • Re: Riemann surface
    ... function is the projection taking the x value. ... So, the sqrt function *is* ... globally defined analytic square root on C or on C without the origin. ... instead of just Z the complex plane that represents the y-component only. ...
    (sci.math)
  • Re: the number of divisors, number theory
    ... sqrt is the square root of n. ... is always smaller than 2 time the sqrt of n). ... and that tau is a multiplicative function. ...
    (sci.math)
  • Re: solution to nonlinear eq
    ... b and g are unknown ... The following finds all possible non-negative integer solutions. ... I have assumed here that the 'sqrt' function gives an exact answer for the ... square root of any integer squared. ...
    (comp.soft-sys.matlab)
  • Re: solution to nonlinear eq
    ... b and g are unknown ... The following finds all possible non-negative integer solutions. ... I have assumed here that the 'sqrt' function gives an exact answer for the ... square root of any integer squared. ...
    (comp.soft-sys.matlab)