I'm converting a >1000 line (needlessley, this guy has constructed a complete jungle of mess) JS script which is highly mathematical into PHP.
The script goes through lots of floor() and round() operations.
I have only got so far through but it appears that I have either:
a) Missed something out between one function and another, or
b) The two languages differ slightly mathematically
I have a difference of a tiny amount (like 0.003 or something in a number in the 100's of thousands), but it's still bugging me before I progress any further as to whether I've missed something.
I wont post the code, you will suffer if I do
What I'm asking is, is it possible that the difference is not my error but just the way the two languages compute (it's only in the thousands of an integer)? I honestly believed that mathematics should be 100% accurate with any language.
I can't afford to carry on if I need to iron out a bug at this stage, the code I'm reading from really is a complete and utter jungle.
Any opinions?
Cheers