Arithmetic Problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Arithmetic Problems

Beng Tiong Tan
Hi,

I am a new user of Octave. It is a very nice piece of software.

I encounter one problems. The following are what happen in Octave:

    octave: 241> 4777.2^2
    ans = %.-3f

Is thsi a bug?

Beng


--
=============================================================
Dr. Beng Tiong Tan (Speech Recognition Researcher)
Vocalis Limited
Chaston House, Mill Court        E-mail : [hidden email]
Station Road, Great Shelford     Tel    : +44 (0) 1223 846324
Cambridge CB2 5DL, UK            Fax    : +44 (0) 1223 846177
=============================================================




Reply | Threaded
Open this post in threaded view
|

Re: Arithmetic Problems

Jim Van Zandt

Beng Tiong Tan <[hidden email]> writes:

> I encounter one problem...
>
>     octave: 241> 4777.2^2
>     ans = %.-3f
>
> Is thsi a bug?

With Octave 2.0.9 (Debian package 2.0.9-1), I get the correct answer:

octave:1> 4777.2^2
ans =  2.2822e+07
octave:2> sqrt(2.2822e+07)
ans = 4777.2

Maybe you have an older version, or it is incorrectly installed.

                                     - Jim Van Zandt