View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default What's wrong with this formula?

Have tried it in Excel 2002 and Excel 2003 but always receive an error

Hi. Just for feedback, I do not receive an error in Excel 2007 as David
mentioned.

Just a note:

Cos[x2 +x1 /-(x1)]


It appears that your program has placed a HOLD on the equation, otherwise
the x1's would have cancelled out (like David mentioned). You may want to
use "ReleaseHold".

Just an additional observation in addition to David's.
Here's a small section of the equation:

equ = 0.77^Sin[E^x1^Sin[Log[2.53]]];

This is highly oscillatory. Are you sure this is correct?
If we look at the symbolic limit, say at infinity, we get a feel for what's
happening. Even the Limit returns an Interval object. (@ Machine Precision)

Limit[equ, x1 - Infinity]
Interval[{0.77, 1.2987012987012994}]

I'm not sure how useful or accurate this can be.
Again, just some feedback. :) Good luck.

(I've seen some interesting code that generates all the Combinations /
Permutations of a list of mathematical operators, and applies it to the
Heads of Permutations of variables. Very interesting, and if avoids the
confusing PostFix notation.)

--
HTH :)
Dana DeLouis


"Alain Sienaert" wrote in message
...
As I mentioned in my previous post these formula's are generated by our
internally developed application.
This application uses postfix notation (e.g. x2 x1 + x1 /) while
generating these formula's and only the results are converted into an
Excel or Mathematica format.
In other words we have implemented 2 functions, one that does the postfix
to Excel conversion and one that handles the postfix to Mathematica
conversion.
I cannot publish the code since it is proprietary code but I guess it
shouldn't be that hard to find similar routines on the internet.

This is the Mathematica equivalent of the Excel formula in my original
post.

-0.0922863908980922 * ( -(Power[Cos[x2 +x1
/ -(x1)],Power[0.77,Sin[Exp[Power[x1,Sin[Log[2.53]]]]]] -Cos[Sin[Cos[Cos[Exp[Sin[Power[Exp[4.71
-2.53],2]]]]]]] -2.6 -2.6 *Power[Log[3.07 +Sin[4.81]],2]
+Power[0.77,Sin[Exp[Power[x1,Sin[Log[2.53]]]]]]
+Power[0.77,Sin[Exp[Power[x1,Sin[Log[2.53]]]]]]
*Power[Exp[Sin[4.03 -x1]],2]])) + -0.0412415105277979

Alain


"Dana DeLouis" wrote in message
...
sin(exp(Power(sin(ln(


Just a side question. In your conversion from Mathematica to Excel, how
did "Power" keep the proper Capitalization , and the remaining functions
went to lower case?
I'm always adjusting the logic to my MmaToExcel[ ] and MmaToVBA[ ]
funtions. :~

--
Dana DeLouis


<snip

By putting
=Power(sin(exp(Power(sin(ln(2.53)),A2))),0.77) in A3 and
=cos(sin(cos(cos(exp(sin(Power(exp(4.71 -2.53),2))))))) in A4,
the expression simplifies to =
-0.0922863908980922 * ( -(POWER(A3 - A4 -2.6 -2.6 * POWER(LN(3.07
+SIN(4.81)),2) + A3 + A3 *
POWER(EXP(SIN(4.03 -A2)),2),COS(B2 -1)))) + -0.0412415105277979
which does fall within Excel's nesting limit spec

I'd be fascinated if you could tell me what the formula actually does
for you.
--
David Biddulph

"Alain Sienaert" wrote in message
...
Hi,

As the title already suggests we are having problems implementing the
function below.
Have tried it in Excel 2002 and Excel 2003 but always receive an error
("The formula you typed contains an error) when pasting the formula
into a cell.
Pasting the same formula in Mathematica does work and it also works in
Open Office 2.02.


-0.0922863908980922 *
( -(Power(Power(sin(exp(Power(sin(ln(2.53)),A2))),0.7 7) -cos(sin(cos(cos(exp(sin(Power(exp(4.71
-2.53),2))))))) -2.6 -2.6 *Power(ln(3.07 +sin(4.81)),2)
+Power(sin(exp(Power(sin(ln(2.53)),A2))),0.77)
+Power(sin(exp(Power(sin(ln(2.53)),A2))),0.77)
*Power(exp(sin(4.03 -A2)),2),cos(B2 +A2 / -(A2)))))
+ -0.0412415105277979


Thanks for looking into this annoying problem,
Alain