I'm curious as to whether a native .NET renderer for TeX/LaTeX exists. So for in my search the closest I have been able to find is a Java implementation, JMathTeX. I am tempted to port this to C#, but before I do so, I would simply like to check whether anyone is aware of a .NET implementation out there.
My curent thuoghts are to use Mi...
Hi
I am doing project euler question 224. And whipped up this list comprehension in Haskell:
prob39 = length [ d | d <- [1..75000000], c <- [1..37500000], b <-[1..c], a <- [1..b], a+b+c == d, a^2 + b^2 == (c^2 -1)]
I compiled it with GHC and it has been running with above average kernel priority for over an hour without returning a re...
I expected the following code to produce: "Both are equal", but I got "Both are NOT equal":
float a=1.3f;
double b=1.3;
if(a==b)
{
System.out.println("Both are equal");
}
else{
System.out.println("Both are NOT equal");
}
What is the reason for this?
...
I just wondered how it is possible to write a user-defined square root function (sqrt) in a way that it interacts properly with F#'s unit system.
What it should be like:
let sqrt (x : float<'u ^ 2>) =
let x' = x / 1.0<'u ^ 2> // Delete unit
(x ** 0.5) * 1.0<'u> // Reassign unit
But this is disallowed due to nonzero const...
I have a function to round a number given to the function to the nearest whole pence.
<script type='text/javascript'>
Math.roundNumber = function(a,b){
if(!isNaN(parseInt(a))){
c = Math.pow(10,b);
return (Math.round(a*c)/c);
}
return false;
}
</script>
however it has come to my attention that the said number inputte...
I have 3 Vectors, Up Right and Front that represent a direction.
I need to convert these into an XYZ angle (3 floats) so i can use with glRotatef()
Please help
[EDIT]
Its not rendering properly. can you see if its anything blatant here: pastebin.com/f6683492d
...
Consider a sales department that sets a sales goal for each day. The total goal isn't important, but the overage or underage is. For example, if Monday of week 1 has a goal of 50 and we sell 60, that day gets a score of +10. On Tuesday, our goal is 48 and we sell 46 for a score of -2. At the end of the week, we score the week like this:
...
I have n elements. For the sake of an example, let's say, 7 elements, 1234567. I know there are 7! = 5040 permutations possible of these 7 elements.
I want a fast algorithm comprising two functions:
f(number) maps a number between 0 and 5039 to a unique permutation, and
f'(permutation) maps the permutation back to the number that it...
Not sure if that is the right way to ask this or not but here is the problem.
Given a latitude of 26.746346081599476, how do I find the number 26.75 as the 16th greater than the number and 26.6875 as the 16th lower than the number?
26.0
26.0625
26.125
26.1875
26.25
26.3125
26.375
26.4375
26.5
26.5625
26.625
26.6875
My Number: 26.746346...
I would like to know how to optimize the following SQL to let my server load faster and take low usage?
I need to calculate the radius distance for a US ZIP Code to get the result, such as 50 miles from a particular ZIP Code ( using latitude and longitude to calculate ) and to getting how many other data ( e.g. others ZIP Code ) from my...
Hello,
Given a set of n numbers (1 <= n <= 100) where each number is an integer between 1 and 450,we need to distribute those set of numbers into two sets A and B, such that the following two cases hold true:
The total numbers in each set differ by at most 1.
The sum of all the numbers in A is as nearly equal as possible to the sum of...
I'm in the process of designing a website that is built around the concept of recommending various items to users based on their tastes. (i.e. items they've rated, items added to their favorites list, etc.) Some examples of this are Amazon, Movielens, and Netflix.
Now, my problem is, I'm not sure where to start in regards to the mathema...
If I have the coordinates of a point (lat lon) and the azimuth angle how can I calculate what points are at "the end' of a distance of 10 miles.
Ex. I am watching North , I know I am at a certain point ... At 10 miles apart what coordinates has that geo point ?
...
How does one solve the (non-trivial) solution Ax = 0 for x in MATLAB?
A = matrix
x = matrix trying to solve for
I've tried solve('A * x = 0', 'x') but I only get 0 for an answer.
...
I have 2 arrays of ints I am using to create a polygon (that looks like a fish). What do I need to do to the arrays to flip the polygon horizontally?
x = new int[]
{ 0, 18, 24, 30, 48, 60, 60, 54, 60, 48, 30, 24, 0 };
y = new int[]
{ 0, 18, 6, 0, 0, 12, 18, 24, 24, 36, 36, 30, 36 };
...
If I have a Catmull-Rom spline of a certain length how can I calculate its position at a certain distance? Typically to calculate the point in a catmull rom spline you input a value between 0 and 1 to get its position via proportions, how can I do this for distances? For example if my spline is 30 units long how can I get its position at...
As you may be able to tell from this screenshot, I am trying to make a physics engine for a platformer I am working on, but I have run into a definite problem: I need to be able to find out the angle of any one of the triangles that you can see make up this mesh, so that I can work out the rotation and therefore angular acceleration of t...
It's been a while since my math in university, and now I've come to need it like I never thought i would.
So, this is what I want to achieve:
Having a set of 3D points (geographical points, latitude and longitude, altitude doesn't matter), I want to display them on a screen, considering the direction I want to take into account.
This is...
Hi,
There is a question in TAOCP vol 1, in "Notes on Exercises" section, which goes something like:
"Prove that 13^3 = 2197. Generalize your answer. (This is a horrible kind of problem that the author has tried to avoid)."
Questions:
How would you actually go about proving this ? (Direct multiplication is one way, another way could ...
Doing a couple rotations in Matlab, one which is rotation about the y-axis, however online I've found two different answers: here and here. Which is correct, if both how does one get to the other?
...