M
Marcin
Hello!
How I can make SQRT(2) with 20 digits precision (after float point)?
How I can make SQRT(2) with 20 digits precision (after float point)?
Marcin said:Hello!
How I can make SQRT(2) with 20 digits precision (after float point)?
Marcin said:Hello!
How I can make SQRT(2) with 20 digits precision (after float point)?
Gregory said:Newtons algorithm with double precision floating point, if the inbuilt one
is insufficient.
Marcin said:Hello!
How I can make SQRT(2) with 20 digits precision (after float point)?
Marcin said:Hello!
How I can make SQRT(2) with 20 digits precision (after float point)?
How I can make SQRT(2) with 20 digits precision (after float point)?
But it did teach me the techniques for doing large precision arithmetic
using smaller registers, which has been valuable since. Do they still
even teach "long division" in schools?
.....1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727jacob said:Lcc-win32 offers a higher precision floating point
(100 digits precision)
Using that you can write:
#include <stdio.h>
#include <qfloat.h>
int main(void)
{
qfloat q = 2;
qfloat r = sqrt(q);
printf("%80.70qf\n",r);
}
Result:
1.4142135623730950488016887242096980785696718753769480731766797379907325
Chris said:.... snip ...
But it did teach me the techniques for doing large precision
arithmetic using smaller registers, which has been valuable since.
Do they still even teach "long division" in schools?
Marcin said:Hello!
How I can make SQRT(2) with 20 digits precision (after float point)?
And is correctly rounded, as bc confirms.CBFalconer said:....1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727
Result from bc. Seems to agree.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.