Had to add tuple support to get binary operations but atan2 should work now. As well as other binary operations such as log(value, base).
The other one is a tricky one: I do a check to see if the result is integer, so that you get 5 instead of 5.0. Large floating numbers always show in scientific notation, but once they are big enough, the precision of the number is not high enough to represent the full number so you don’t get anything after the comma and it assumes it’s an integer.
But I think I can just make everything show full form.
log1p worksfine . I can’t add base system, but log change of base formula can take you from any base to any other easily.
Also fixed scientific notation.
ok log1p now is work,so can you add a phi constant?
about the scientific notation problem i think you can use setprecision(200) or printf(“x = %200lf\n”, x);
I need at least 200 digit output because that is youtube maximum output
if number over it,that just use scientific notation
This function will return |x| with the sign of y.
EX:
copysign(1.0,1.0) = 1.0
copysign(-2.0,10.0) = 2.0
copysign(10.0,-0.1) = -10.0
coptsign(-5.0,-0.0)= -5.0
I believe most of those are from python 2.7 and my server is running 2.6
Why do you need exp(x), just do e**x, also what are you guys even using this api for? It’s meant for quick in chat calculation, why would you need to do advanced calculations in chat?!
Just curious, what are you using this customapi for? For any real tasks an actual calculator should be used, and for any advanced calculations a more local solution is generally used. Its really only meant for quick one-off calculations through chat, as ehsankia mentioned.
Would you consider adding an optional flag such as “stripcomma”? http://twitch.center/customapi/math?stripcommas=1&expr=1,245+100
That way, people have the option to loose the more advance features like atan2 if the need to strip commas but by default, everything would work as it does now.
The thousand separator could be a similar option (thousep=, for instance).
Is there any way to implement a constant, I wanted to create a command that uses this API to see how many followers someone needs to reach 1000000 followers, how can I do this if possible?