Skip to content
Advertisement

Tag: modulo

How can I calculate a really long number with modulo without using bcmod?

The bcmod function is deactivated and I won’t be able to activate this because its not my own server. For a reason I need to calculate an integer with a length of atleast 24 with modulo 97. Integer cant be that long, thats why it can’t work… I already tried it with simple operator “%” and the “fcmod” lib but

Incorrect PHP calculation

Can someone give me an explanation on why this is happening in PHP: It’s probably very simple but logically I do not see any explanation. Probably how PHP works in the background. I was trying to get the first two decimal positions of a number when I ran into this case. Result should be 29 naturally. If I round the

Advertisement