[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Computing square-root of two [Was: Re: No subject]
From: |
Hugo Coolens |
Subject: |
Re: Computing square-root of two [Was: Re: No subject] |
Date: |
Fri, 17 Feb 2012 12:11:52 +0100 |
vpa(sqrt(2))
2012/2/17, Tatsuro MATSUOKA <address@hidden>:
> hello
>
> octave:3> sqrt(2)
> ans = 1.4142
>
> Regards
>
> Tatsuro
>
> --- On Fri, 2012/2/17, Bård Skaflestad <address@hidden> wrote:
>
>> On Fri, 2012-02-17 at 10:24 +0100, joseph appau wrote:
>> > please i need help in how to find" square root of 2" in 15 significant
>> > figures
>> >
>>
>> x = 1.5;
>> x = (x + 2/x) / 2;
>> x = (x + 2/x) / 2;
>> x = (x + 2/x) / 2;
>> x = (x + 2/x) / 2;
>> fprintf('%18.15f\n', x)
>>
>> Or, you can look up the 'sqrt' function in the Octave help.
>>
>>
>> Sincerely,
>> --
>> Bård Skaflestad <address@hidden>
>> SINTEF ICT, Applied Mathematics
>>
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
>> https://mailman.cae.wisc.edu/listinfo/help-octave
>>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
Re:, Martin Helm, 2012/02/17
Re: your mail, lxnf98mm, 2012/02/17
Computing square-root of two [Was: Re: No subject], Vic Norton, 2012/02/17