Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Possible error in MOD function

Try typing the following ...

=MOD((1/(TAN(PI()/4-ATAN(120/119)))),1)

This produces the answer 1 in Excel 2000 and Excel 2003.
I think it should be zero, because the expression before the comma in MOD
equals -239

Peter K

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Possible error in MOD function

If I evaluate the formula segments in XL2003...

=MOD((1/(TAN(PI()/4-ATAN(120/119)))),1)

becomes this:
=MOD(-239.000000000001,1)

And the MOD is: 0.999999999999233

Since the binary math may be toying with you....
try this:

=MOD(ROUND(1/(TAN(PI()/4-ATAN(120/119))),5),1)
which results in 0.

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"Peter K" <Peter wrote in message
...
Try typing the following ...

=MOD((1/(TAN(PI()/4-ATAN(120/119)))),1)

This produces the answer 1 in Excel 2000 and Excel 2003.
I think it should be zero, because the expression before the comma in MOD
equals -239

Peter K

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function error Rosemary Excel Worksheet Functions 8 October 20th 06 09:50 AM
If error function Neil M Excel Worksheet Functions 6 April 26th 06 06:56 PM
3D Function Error srpettew Excel Discussion (Misc queries) 2 April 18th 06 09:48 PM
IF THEN function error jmcclain Excel Worksheet Functions 10 January 8th 05 12:18 AM
IF function with #N/A error Roccobarocco Excel Worksheet Functions 4 December 5th 04 08:59 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"