Hi!
Is there a tool which allow to convert graphical representation of equestion to that equestion ? (Graphical representation to aproxx. math equestion)
I'm looking for a Java library that is geared towards network math and already tested. Nothing particularly fancy, just something to hold ips and subnets, and do things like print a subnet mask or calculate whether an IP is within a given subnet.
Should I roll my own, or is there already a robust library for this?
given an X, what math is needed to find its Y, using this table?
x->y
0->1
1->0
2->6
3->5
4->4
5->3
6->2
language agnostic problem
and no, i dont/cant just store the array, and do the lookup.
yes, the input will always be the finite set of 0 to 6. it wont be scaling later.
Hi All guys!
this time i have a math question for you!
Assuming we have three numbers one is the Number of Votes the second is the Total Values and the last is the Units Ratings.
units_ratings can be a number from 1 to 10;
if ( total_values / units_ratings != number_of_votes ) {
//do something for let the "number_of_votes" fit the division!
…
I'm trying to round a number to it's first decimal place and, considering the different MidpointRounding options, that seems to work well. A problem arises though when that number has sunsequent decimal places that would arithmetically affect the rounding.
An example:
With 0.1, 0.11..0.19 and 0.141..0.44 it works:
Math.Round(0.1, 1) == 0.1…
Hi, I'm new here.
I'm trying to make a top-down spaceship game and I want the movement to somewhat realistic. 360 degrees with inertia, gravity, etc.
My problem is I can make the ship move 360 with inertia with no problem, but what I need to do is impose a limit for how fast the engines can go while not limiting other forces pushing/pulling…
I am trying to generate a random number for the css opacity.
This is what I tried so far.
CSS
.test{
position : absolute;
width : 15px;
height : 15px;
border-radius:15px;
background-color : black;
}?
Script
$(function() {
for (var i = 0; i < 300; i++) {
$("<div>", {
class: "test",
…
I'm trying to create a very specific geodesic tessellation, but I can't find anything online about it.
It is normal to subdivide the triangles of an icosahedron into triangle patches and project them onto the sphere. However, I noticed an animated GIF on the Wikipedia entry for Geodesic Domes that appears not to follow this scheme. Geodesic…
Does anyone know where I might find a PHP matrix math library which is still actively maintained?
I need to be able to do the basic matrix operations like reduce, transpose (including non-square matrices), invert, determinant, etc.
This question was asked in the past, then closed with no answers. Now I need an answer to the same question.…
All I need is to check, using python, if a string is a valid math expression or not.
For simplicity let's say I just need + - * / operators (+ - as unary too) with numbers and nested parenthesis. I add also simple variable names for completeness.
So I can test this way:
test("-3 * (2 + 1)") #valid
test("-3 * ") #NOT valid
…
I'm writing a custom dice rolling parser (snicker if you must) in python. Basically, I want to use standard math evaluation but add the 'd' operator:
#xdy
sum = 0
for each in range(x):
sum += randInt(1, y)
return sum
So that, for example, 1d6+2d6+2d6-72+4d100 = (5)+(1+1)+(6+2)-72+(5+39+38+59) = 84
I was using regex to…
Hi all,
I'm looking for a library to find the integral of a given set of random data (rather than a function) in C++ (or C, but preferably C++). There is another question asking about integration in C but the answers discuss more how to integrate a function (I think...). I understand that this can be done simply by…
Basically I can't get it right.
I need something like this:
if($p == 1)
{
$start = 0;
$limit = 16;
}
The numbers must add on depending on the value of the $p, e.g. if $p is 5 then the values of $start and $limit would be:
if($p == 5)
{
$start = 64;
$limit = 80;
}
The math is to add 16, depending…
i wrote this python code, which from wolfram alpha says that its supposed to return the factorial of any positive value (i probably messed up somewhere), integer or not:
from math import *
def double_factorial(n):
if int(n) == n:
n = int(n)
if [0,1].__contains__(n):
return 1
a…
I'm in the middle of porting David Blei's original C implementation of Latent Dirichlet Allocation to Haskell, and I'm trying to decide whether to leave some of the low-level stuff in C. The following function is one example—it's an approximation of the second derivative of lgamma:
double trigamma(double x)
{
…
Are there any libraries or techniques that simplify computing equations ?
Take the following two examples:
F = B * { [ a * b * sumOf (A / B ''' for all i ''' ) ] / [ sumOf(c * d * j) ] }
where:
F = cost from i to j
B, a, b, c, d, j are all vectors in the format [ [zone_i, zone_j, cost_of_i_to_j], [..]]
…
I have two tables of concern here: users and race_weeks. User has many race_weeks, and race_week belongs to User. Therefore, user_id is a fk in the race_weeks table.
I need to perform some challenging math on fields in the race_weeks table in order to return users with the most all-time points.
Here are…
This question burns my brain.
I have an object on a plane, but for the sake of simplicity let's work just on a single dimension, thus the object has a starting position xs. I know the ending position xe. The object has to move from starting to ending position with an accelerated (acceleration=a) movement. I…
I have method for converting array of Booleans to integer. It looks like this
class Program
{
public static int GivMeInt(bool[] outputs)
{
int data = 0;
for (int i = 0; i < 8; i++)
{
data += ((outputs[i] == true) ?…
I am trying to generate a 3d tube along a spline. I have the coördinates of the spline (x1,y1,z1 - x2,y2,z2 - etc) which you can see in the illustration in yellow. At those points I need to generate circles, whose vertices are to be connected at a later stadium. The circles need to be…
Hello,
I'm currently involved in a project where I have very large image volumes. This volumes have to processed very fast (adding, subtracting, thresholding, and so on). Additionally most of the volume are so large that they event don't fit into the memory of the system.
For that…
I am attempting to have a projectile follow the direction a gun is facing. When using the following code I am unable to make the projectile go in the right direction.
float speed = .5f;
float dX = (float) -Math.cos(Math.toRadians(degree)) * speed;
float dY = (float)…
NET Mathematical Libraries
.NET Builder for Matlab
The MathWorks Inc. - http://www.mathworks.com/products/netbuilder/
MATLAB Builder NE generates MATLAB based .NET and COM components
royalty-free deployment
…
Hi all, sorry for the confusing title, its really hard for me to explain what i want. So i created this image :)
Ok so the two RED dots are points on an image. The distance between them isnt important.
What I want to do is, Using the coordinates for the two dots,…