# Recent questions tagged math

854 views
This python code for x in range(20, 50): print(x,math.factorial(x),math.pow(2,x), math.factorial(x) % math.pow(2,x) ) calculates ... calculates the mod function but was wondering if anyone actually knew. See Question&Answers more detail:os...
676 views
I'm a little freaked out by the results I'm getting when I do modulo arithmetic in Objective-C. -1 % 3 is coming out to be -1, which isn't ... be using besides the % operator to get the correct result? See Question&Answers more detail:os...
589 views
I've read a few discussions regarding finding Y at X for a cubic Bezier curve, and have also read this article regarding the matter. My ... efficient algorithm that takes such constraints into account? See Question&Answers more detail:os...
717 views
What is BODMAS and why is it useful in programming? See Question&Answers more detail:os...
895 views
Given a point in 3D space, what are the three angles (e.g. Euler angles) needed to transform a line to point to that object? Imagine I have a line (or a ... angles to point to a location such as (1,2,3). See Question&Answers more detail:os...
679 views
I have to find LCM of n numbers MODULO 10^9+7.My approach is find LCM of two numbers and then MOD them.Then take the LCM of next element and the ... and MOD them.Do this for all elements.Is it wrong ? See Question&Answers more detail:os...
830 views
Using Python 3.5 both at repl.it and the console in Windows, I get wrong answers for cube roots. When the input is (-1)**(1/3), I get the ... seems to give a complex result. Am I doing something wrong? See Question&Answers more detail:os...
574 views
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Ok, so i am working ... function to the findPrimes function findPrimes(number_to_test , odds) See Question&Answers more detail:os...
830 views
I've got a database filled up with doubles like the following one: 1.60000000000000000000000000000000000e+01 Does anybody know how to convert a number like that to a ... << d << std::endl; } Thanks! See Question&Answers more detail:os...
578 views
I'm trying to write a java mobile application (J2ME) and I got stuck with a problem: in my project there are moving circles called shots, and non moving ... (angle))*v; } thanks in advance for all helpers See Question&Answers more detail:os...
601 views
I have a set of points which comprise a (in theory) co-planar curve. My problem is that the plane is arbitrary and can move between each time I collect ... help on the second point as well. Thanks a ton! See Question&Answers more detail:os...
650 views
Seems like it's not as simple as RGB1*A1 + RGB2*A2...how are values clipped? Weighted? Etc. And is this a context-dependent question? Are ... answers, but context from other environments is useful too. See Question&Answers more detail:os...
546 views
I have the following code which determines whether a number is prime: public static boolean isPrime(int n){ boolean answer = (n>1)? true: false; for(int i ... ? What is the size of the input in this case? See Question&Answers more detail:os...
567 views I need to draw line from the centre of a circle. For this I first chose centre of the image as a circle centre and draw a circle with known radius. ... 6 degree. Below is my image is after 120 degree. See Question&Answers more detail:os...
635 views
I know that array operators have the precedence. Then the binary arthimetic operators * , / , % . Then + and - which they are low precedence. But I ... by part. Because this always confuses me in exams. See Question&Answers more detail:os...
671 views
What is best way or an algorithm for generating a random 3d point [x,y,z] inside the volume of the circular cylinder if radius r and height h of the cylinder are given? See Question&Answers more detail:os...
668 views
What is the equation of a helix parametrized by arc length (i.e. a function of arc length) between any two points in space? Is there any function ... do i implement the same using matlab or mathematica ? See Question&Answers more detail:os...
597 views
I know that I can just say: radians = degrees * Math.PI/180 However I expect there to be a built in framework method, as it is such a common requirement ... me by telling me how to write my own method.) See Question&Answers more detail:os...
634 views
I have been trying to find a solution to adding relationships, such as X has unit A < 20 into an existing ontology, but, could not find a solution ... for only few concepts in a knowledge graph - RDF See Question&Answers more detail:os...
636 views
I am currently developing a differential operator for sympy that can be placed in matricial form. In this case the order of the args list when creating a ... took place. How to avoid args to be sorted? See Question&Answers more detail:os...
571 views
Where can I find the information about error ranges for trigonometric function instructions on x86 processors, like fsincos? See Question&Answers more detail:os...
708 views
I have 37 linear equations and 36 variables in the form of a matrix equation; A*X=B . The equations don't have an exact answer. I want to use ... am new to Matlab so any comments will help. Thank you See Question&Answers more detail:os...
554 views
I try to implement some number type and I hit the issue that mynum * 1 works, but not 1 * mynum I tried to define an implicit ... conversion not considered in this case with generic parameters?. See Question&Answers more detail:os...
670 views
I have a decimal. The range of this decimal is between 0 and 23.999999. This decimal represents a time. For example, if the decimal is 0.25, then ... do I fill in the Hours, Minutes, and Seconds values? See Question&Answers more detail:os...
816 views