[Courses] [C Doubt]
Anand R
anand.r at cybertech.co.in
Wed Oct 9 20:35:22 EST 2002
Sneha, No answers to your question, but some more results on random trials I
conducted:
The value of the calculator here will be equal to the program
pow(20,13)
pow(30,13)
pow(60,13)
pow(72,13)
pow(80,13)
pow(120,13)
pow(160,13)
The value of the calculator here will be greater than the program
pow(71,13)
pow(73,13)
pow(74,13)
pow(75,13)
pow(76,13)
pow(78,13)
pow(79,13)
pow(95,13)
pow(125,13)
pow(145,13)
pow(210,13)
The value of the calculator from hereon will be lesser than the program
pow(65,13)
pow(70,13)
pow(77,13)
pow(85,13)
pow(135,13)
pow(140,13)
pow(180,13)
pow(200,13)
pow(220,13)
Still working on trying to figure out, what is happening here.
Regards,
--Andy
-----Original Message-----
From: sneha [mailto:sneha at vit.ac.in]
Sent: Sunday, September 08, 2002 7:51 AM
To: Linuxchix
Subject: [Courses] [C Doubt]
Hello all :)
I have a doubt in c's (pow) function...
I tried to run this code..which resulted in an output:
2375726401805877617098752
#include<math.h>
main()
{
printf("%.0lf\n",pow(75,13));
}
but, what I found in the calculator was
2375726401805877685546875
a difference of...
68448123
what I want to know is.......what is the limit of a double variable and what
is a solution to get an answer what I got in CALCULATOR...
thanx in advance..
happy day
friendly
sneha :o)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linuxchix.org/pipermail/courses/attachments/20021009/4645a494/attachment.xhtml
More information about the Courses
mailing list