[KIAI-458] - Formula not accepted

After attempting to edit the leveling formula to 18141.0333*({level}-5.927)^(1/3)+({level}-1)*229.844911+31269.02231, the bot says that, at Level 5, the XP goes beyond the range of 1 and 100 million, when it is in fact exactly 14500. It has been confirmed using GeoGebra and the function g(x)=18141.0333 (x-5.927)^(((1)/(3)))+(x-1)*229.844911+31269.02231 that, indeed, g(5) equals 14500, and that g(50) and g(100) produce the same result as the bot when calculating the formula. Bashing my head against the wall (trying to submit the formula over and over) did not resolve the issue, neither did spacing out all of the elements of the formula.
No description
No description
14 Replies
EasyThreads
EasyThreads2mo ago
Hey @Neulo! Our team will answer your post soon. If this is an issue in your server, make sure you've included your server's ID (This can be found on the /ping command), as well as which users are having this issue. Once your question has been answered, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution to help others find the solution via Answer Overflow
Asleep
Asleep2mo ago
Hey. I’m pretty sure Kiai calculates exponents using **, like 3**2 would be 9
Neulo
NeuloOP2mo ago
if it was, then the two other calculations wouldnt go through
No description
Neulo
NeuloOP2mo ago
and here it just fails all of them
Shadow
Shadow2mo ago
@Kiai eval kiai.leveling.limitedMathEvaluate(18141.0333*(1-5.927)^(1/3)+(1-1)*229.844911+31269.02231)
Kiai
Kiai2mo ago
Complex { re: 46703.533464305976, im: 26733.35750924651 }
Complex { re: 46703.533464305976, im: 26733.35750924651 }
Type:
Complex
Complex
⏱ 957.25μs
Shadow
Shadow2mo ago
looks like for level 1, it results in an imaginary number 46703.533464305976 + 26733.35750924651i @Kiai eval kiai.leveling.limitedMathEvaluate(18141.0333*(5-5.927)^(1/3)+(5-1)*229.844911+31269.02231)
Kiai
Kiai2mo ago
Complex { re: 41032.60292926658, im: 15318.605441511927 }
Complex { re: 41032.60292926658, im: 15318.605441511927 }
Type:
Complex
Complex
⏱ 1.88ms
Shadow
Shadow2mo ago
Same thing for level 5
Neulo
NeuloOP2mo ago
oh wow lol soooooooo anything that could be done about this issue?
Aleksandar
Aleksandar2mo ago
I’m marking this as a bug so I’ll see if I can fix the issue and get back to you
Neulo
NeuloOP2mo ago
from my limited testing (removing certain parts of the formula), everything gets fixed when i remove the ^(1/3) now, everything gets also fixed when i do this 18141.0333*cbrt({level}-5.927)^(1/3)+({level}-1)*229.844911+31269.02231 instead of using ^(1/3), i used cbrt() now, defining non-cubic and non-square roots is still an issue, which cant be dismissed
Neulo
NeuloOP2mo ago
funny
No description
Baylem
Baylem2mo ago
Yes its because the raw mathematical calculation doesn't enforce a real number and it ends up a Complex result because of the result where if {level} - 5.927 is negative and you try to ^(1/3) it ends up as a Complex because of how it gets interpreted at runtime. The natural log of a negative number is usually a Complex number in most programming languages. If you force the cube root, it forces the mathematical calculation to stay in the real number domain

Did you find this page helpful?