math
Stock exchange party calculations
I\'m writing a program (http://dancingrobots.org/beurs/) for my youth club that calculates prices of drinks by the number of times it has been bought in the last round (quite a fun party concept). Now[详细]
2023-04-11 08:47 分类:问答How to generate a set of values that follow certain distribution in c++/java?
F开发者_如何转开发or example, I have a p.d.f f(x) = 1/25 - x/1250 (from x = 0 to 50); My question is that how to generate a set of values that satisfy the given p.d.f.[详细]
2023-04-11 06:46 分类:问答Arithmetic vs logical shift operation in C++
I have some code that stuffs in parameters of various length (u8, u16, u32) into a u64 with the left shift operator.[详细]
2023-04-11 06:40 分类:问答Retrieve multiple information by a single number?
I was wondering how they did come up with the way of setting permissions using chmod by开发者_如何学JAVA just using numbers. For example:[详细]
2023-04-11 05:04 分类:问答Translate integer to letters and vice versa (e.g. 0 = "A", 26 = "AA", 27 = "AB")
So I have this function: function toAlpha($data){ $alphabet =array(\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\',\'j\',\'k\',\'l\',\'m\',\'n\',\'o\',\'p\',\'q\',\'r\',\'s\',\'t\',\'u\',\'v\',\[详细]
2023-04-11 03:57 分类:问答Tricky conditional maths
This one is tricky to me: I have four groups of 8 LEDs.A is 1-8, B is 9-16, C is 17-24, and D is 25-32.[详细]
2023-04-11 03:29 分类:问答Simple Multiplication and Arithmetic in C
I have an assignment to compute the roots of quadratic equations in C, should be pretty simple and I know what I need to do with the program but I am having a problem nonetheless.[详细]
2023-04-11 02:14 分类:问答Function to count decimal places with PHP
Is there a native PHP function which tells me how many decimal places a number 开发者_开发技巧has, or will I have to make my own?[详细]
2023-04-11 00:52 分类:问答javascript make a numbers to be multiples of 150
I\'m trying to get numbers to be multiples of 150. (all the num > 0) if num = 0.333333 => output 150[详细]
2023-04-10 23:12 分类:问答PHP actuarial-type probability formula
How would I convert the following formula to php to solve for \"p\": (1-p)^365=.80 What I\'m trying to do is calculate the daily probability of an event based on the annual probability. For example[详细]
2023-04-10 19:52 分类:问答