Re: Decimal question and sqrt in math.h
[EMAIL PROTECTED] wrote: > > #include > #include > > int main() > { > printf("\n %1.55f \n", sqrt(3.)); > return 0; > } > > Result: 2 > > Why does this return 2 ?? If you meant to use long double, you should have so specified. Decimal digits beyond 17 aren't significant in
Re: Decimal question and sqrt in math.h
On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Why does this return 2 ?? You should read: http://www.validlab.com/goldberg/paper.pdf which is linked on http://gcc.gnu.org/readings.html . Thanks, Andrew Pinski