LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2006, 11:43 AM   #31
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148

But is the significant digits that is the issue here. Internally 1/30! is held as 3.7699876 *10^-33 (or something like that) whereas your value for e is held as 2.7182818*10^0 (or there about) for the computer to add one to the other it requires them to be of the same base. When it converts 1/30! to base 10^0 it will lose all of the digits because it can only hold 18 digits at base 10.

Your answer is shown to more than 18 digits because of the conversion from base 2 (the internal representation) and base 10 (the representation of the number on your screen).

This is a fundamental characteristic of floating point numbers. I hope that my explanation helps.

graeme.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Installing nVidia NV37GL [Quadro FX 330] in DELL Precision WS 370 nixon_vb Linux - Hardware 2 07-07-2005 08:50 AM
Problem with kernel 2.6 on a Dell Precision 670 aceroni Linux - Hardware 3 11-03-2004 10:21 AM
Stange joystick problem (Sidewinder precision pro) Ut2004 tackettb Fedora 0 08-21-2004 12:16 PM
fortran 77 precision buddy_epson Programming 0 07-19-2003 03:51 AM
My Dell Precision w/RH 8.0 turns itself off borbjo Linux - Hardware 1 01-25-2003 06:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration