LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming,sci.math
external usenet poster
 
Posts: 8
Default Excel Math Bug

"Harlan Grove" writes:

"Alan Beban" wrote...
...
. . . (which, incidentally, seems to have been resolved in C
the same way as it is in Excel, which is hard to blame Microsoft for)

...

What are you talking about?!

Unless you mean to recommend that Excel users stop using the ^ operator and
use the POWER function instead, Excel and C don't work the same. C lacks an
exponentiation operator. It includes a function named pow in its standard
library. It has a ^ operator, but it's bitwise XOR.


He probably means that unary minus has a significantly higher precedence
than subtraction, so much so that it has a strictly higher precedence
than at least one operator that one would commonly view as being of a
strictly higher precdence than subtraction.

Therefore there is a concrete example of an expression which is
interpretted differently in C than it would be using people like you's
conventions.

In C's case, the precedence inversion is with the multiplicative family
of operators.
e.g. compare C's interpretation of -2%3 as (-2)%3 rather than -(2%3).

Simple, eh? Barely need for an interrobang.

Phil
--
1st bug in MS win2k source code found after 20 minutes: scanline.cpp
2nd and 3rd bug found after 10 more minutes: gethost.c
Both non-exploitable. (The 2nd/3rd ones might be, depending on the CRTL)
 
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
Less Excel more Math Ty Excel Worksheet Functions 1 April 16th 11 06:28 AM
Math functions in Excel Farhad Excel Discussion (Misc queries) 2 February 19th 07 04:16 PM
Excel math formula dan Excel Worksheet Functions 4 October 30th 06 04:51 PM
How do I ? math/excel question Madduck Excel Discussion (Misc queries) 3 July 26th 06 05:41 AM
More math than excel, but a fun problem S Davis Excel Worksheet Functions 4 July 6th 06 10:04 PM


All times are GMT +1. The time now is 02:34 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"