I'd like to create a function that calculates the distance between two pairs of lat/longs using the pythag theorem instead of the haversine great-circle formula. Since this will be over relative short distances (3km), I think this version that assumes a flat earth should be OK. How can I do this? I asked the internet and didn't come up w...
Hi,
I am working with microtime() to time some scripts, but all the scripts have really quick times, eg 2.1934509277344E-5
how can i get php to display that correctly without e-5?
(which i assume is 0.000021934509277344? long time since i did maths...)
...
Gaffer on Games has a great article about using RK4 integration for better game physics. The implementation is straightforward but the math behind it confuses me. I understand derivatives and integrals on a conceptual level but I haven't manipulated equations in a long time.
Here's the brunt of Gaffer's implementation:
void integrate(S...
Let's say I have a MySQL table that is something like this:
software table:
id int
name text
votes int
rating int
Where votes would be the number of times someone has voted for that item and rating would be the average of those votes.
Example data:
id: 0
name: FooBar!
votes: 5
rating: 3
Now another user comes along and rates this...
Hi all...
Is there is a library for invoking math symbols/formula(not sure what to call), which are design specifically to be added in a websites called maybe in html, php or javascript code.
Just like the button for bold, italic, link, etc. above the textarea in answer/ask ques page(sorry bout earlier), there will be another icon to ...
What is a good representation for matrices in Clojure? I'm interested in dealing with dense matrices of floating point numbers. The "list of lists" representation springs to mind, but is there something better?
Some criteria for a good representation include:
Efficiency: They won't be used for constant processing of huge data sets, bu...
In decimal (base 10), 1/3 can only be approximated to 0.33333 repeating.
What number is the equivalent in binary that can only be represented as an approximation?
...
Possible Duplicates:
Strange problem comparing floats in objective-C
Is JavaScripts math broken?
1.265 * 10000 = 126499.99999999999 ?????
After watching this I discovered that in JavaScript:
0.1 + 0.2 === 0.3
evaluates to false.
Is there a way to work around this?
...
What is the most efficient way to generate all the combinations, dispositions and permutations of an array in PHP?
...
All the methods in System.Math takes double as parameters and returns parameters. The constants are also of type double. I checked out MathNet.Numerics, and the same seems to be the case there.
Why is this? Especially for constants. Isn't decimal supposed to be more exact? Wouldn't that often be kind of useful when doing calculations?
...
I would like to develop a poker odds application that can give the probability of various game situations. Since the application will be mostly statistical analysis, I figured I would see if someone else had already written a library that implements the required mathematics.
I would prefer cross-platform open-source in C++, but that's n...
I'm trying to write some code that will do "fuzzy hashing". That is: I want several inputs to hash to the same output so that I can do searches etc quickly and easily. If A hashes to 1 and C hashes to 1, it will be trivial for me to find out that A is equivalent to C.
Designing such a hash function seems hard, so I was wondering if any...
Quaternions are good for interpolate rotations between them. so far so good.
If I have a networking game, will it suffice to transfer the rotation as vector3f or should I use a quaternion?
To make the game smoother I may have to interpolate between the last sent rotation and the current one.
But can I interpolate rotations between two ...
I'm developing a program for class that reads a matrix and then prints it with an identity matrix. Then step by step I have to reduce it into its identity matrix while applying the same calculations onto the identity matrix and therefore getting the inverse of that matrix.
I'm stuck at the row reducing section of the code. I'm trying t...
Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long and distance and as output I would like two coordinates; one being the south-west (bottom-left) corner and one being the north-east (top-right) corner. I have seen a ...
Given my previous questions about the the usage of AMPL.
Are there any other programming/scripting languages that are strictly meant for mathmatical processing?
For example: Matlab (it does deviate a bit from a mathematical structure, but its close enough), Mathmatica, and AMPL
...
Hi everyone. I think this is probably a simple maths question but I have no idea what's going on right now.
I'm capturing the positions of "markers" on a webcam and I have a list of markers and their co-ordinates. Four of the markers are the outer corners of a work surface, and the fifth (green) marker is a widget. Like this:
Here's ...
According to here, arithmetic-shift will bit-shift left and right. The right shift preserves the sign. Is there any unsigned right-shift operator, which fills the vacated bits with zero instead of the sign bit?
...
Is there an easy way to display math in the Safari web browser? My main target is the iPhone safari.
...
hi
I have to include math symbols in my asp.net
so whatever the symbols it may be sigma , integral , pie etc..or any
how to write or display the Symbols in asp.net it should be UI so when the user click the
particular Symbols it will display in the textbox or any editor control..
If anyone have idea let me know...?
thanks.
...