Home | Reviews | GUIpedia | Forum | Fun500


JasonWays of the math
Anyone who has made a  scripter, who has had it do math, i was wondering if it supported BODMAS/BOMDAS (Brackets Of Division, Multiplication, Addition, Subtraction) or just something like this 1 + 5 / 2 * 3 would be ((((1) + 5) / 2) * 3)?
2010-09-086:46 AM

ToddRe:Ways of the math
Look up the "shunting yard" algorithm or "recursive descent" which both talk about how to do math equations.
2010-09-086:56 AM

JasonRe:Ways of the math
would the (((.).).) one be usable and/or acceptable?  
2010-09-087:08 AM

ToddRe:Ways of the math
Yes, recursive descent accounts for this and shunting-yard is simply a more understandable means of doing that.
2010-09-085:19 PM

Other


2021 Brandon Cornell