-
Notifications
You must be signed in to change notification settings - Fork 22
Special Command Documentation
~math utilises the SymPy library running in concurrent subprocesses to perform calculations. It supports almost all SymPy features, NumPy features, as well as several custom additions, making it an incredibly powerful command. By default it has a timeout limit of 24 seconds at which point subprocesses are automatically restarted, in order to protect the bot against malicious uses of the command. The numerical inputs of many other commands optionally accept any equation that may be evaluated to a real number via this command.
~math 1+1
1+1 = 2
- Evaluates operations in the typical BODMAS order.
~math (4 + 101) * 3.2 ^ 9 / 0.3
(4 + 101) * 3.2 ^ 9 / 0.3 = 12314530.2310912
962072674304
────────────
78125
- "deg" is a hardcoded variable that is always equal to π/180 (since SymPy uses radians as the default angle unit)
~math tan(75deg) * 6
tan(75deg) * 6 = 22.392304845413263761164678049035234201656831522862283768334841876711598101452800222486877120543491454053756848492440218179819671
6∙√3 + 12
- This wraps the sympy.limit function, allowing easy evaluation of limits as well as substitutions.
~math lim(sin(x) / tan(x), x=0)
lim(sin(x) / tan(x), x=0) = 1
- Normally this function is called "integrate" in SymPy, "intg" is simply an alias specific to Miza.
~math intg(8/x - 9^x)
intg(8/x - 9^x) = -0.45511961331341869680712008286805350030631802862760587236315103164764054159689687332363589041904357414485064160234702996333541748*9.0**x + 8.0*log(x)
x
- 9 + log(43046721)∙log(x)
───────────────────────────
2∙log(3)
- A space after a function will cause it to operate on as much of the rest of the equation as possible.
~math series cot(x)
series cot(x) = 1/x - 0.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333*x - 0.022222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222*x**3 - 0.0021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021164021*x**5 + O(x**6)
3 5
1 x x 2∙x ⎛ 6⎞
─ - ─ - ── - ──── + O⎝x ⎠
x 3 45 945
- SymPy is unable to find very large prime factors; Miza uses an implementation of ECM/SIQS, compiled using
-O3
in order to perform factorization of numbers 2^64 or higher.
~math factorize 926624075136003096545328250804711150013986785341302199487213356671
factorize 926624075136003096545328250804711150013986785341302199487213356671 = [682147664994066786270370071898073, 1358392211375615758890099570491927]
- Able to use all SymPy plotting functions, automatically uploading them to Discord as message attachments.
~math plot atan(x)
- Able to use NumPy arrays, which will default to using Sympy's Symbol as their data type. Most NumPy array functions are supported, including multi-dimensional matrix operations.
~math array([0.9, 0.8], [0.1, 0.2]) @ array([0.9, 0.8], [0.1, 0.2]) @ array([0.9, 0.8], [0.1, 0.2])
array([0.9,0.8],[0.1,0.2])@array([0.9,0.8],[0.1,0.2])@array([0.9,0.8],[0.1,0.2]) = [[889/1000, 111/125], [111/1000, 14/125]]
⎡889 111⎤
⎢──── ───⎥
⎢1000 125⎥
⎢ ⎥
⎢111 14⎥
⎢──── ───⎥
⎣1000 125⎦
~math std([6.26,6.23,6.34,6.26,6.24,6.32,6.26,6.30,6.35,6.28])
std([6.26,6.23,6.34,6.26,6.24,6.32,6.26,6.30,6.35,6.28]) = 0.039547439866570377023096004599049311060101564575088264603038624524976335121731679426234333322105190006337321094292526744914871829
√391
────
500
- Some additional custom functions:
~math random(1, 6) # randomiser
random(1, 6) = 6
~math brainfuck(--[------+<]-----.[----+<]-----.+++.+++[--+++<]-.) # brainfuck interpreter
brainfuck(--[------+<]-----.[----+<]-----.+++.+++[--+++<]-.) = bruh
~math predict_next([2, 10, 30, 68, 130]) # number sequence analyser
predict_next([2, 10, 30, 68, 130]) = 222
~math ncr(20, 4) # combinatoric math
ncr(20, 4) = 4845
~math normcdf(0.015) # features replicated from MATLAB (not actually used as a backend)
normcdf(0.015) = 0.5059839098085622313559945968065538999733772181397131831462237785234884185900457339812876872297739877112041169683752824377648909
⎛3∙√2⎞
1 - 0.5∙erfc⎜────⎟
⎝400 ⎠
~math plot_array([5, 9, 12, -1, 3]) # direct support for Matplotlib
- This command is open to suggestions for more custom additions or integrations!
~reminder is a powerful command that can be used to schedule messages in an embed at a certain point in the future.
This multipurpose discord bot uses an Alias from a popular indie game called Cave Story, published by Diasuke Amaya (Pixel) in 2004. Cave Story is a video featuring the main protagonist, Quote, and the main antagonist, the Doctor. The Doctor uses an item called the Demon Crown to control his minions in the game who are named Balrog and Misery. Misery is a blue haired witch in the game who comes from a family of magic users. Her brothers name is Ballos who is another main antagonist in the game of Cave Story. Her mother's name is Jenka who is a friendly and elderly witch located in the Sandzone. All of them possess magical abilities varying to certain degrees. Misery's name was shortened to "Miza" to shorten the pronunciation and to make it easier to remember. For more information about Misery, please visit this [link](https://cavestory.fandom.com/wiki/Misery).
This video game takes quite a turn when it comes to modding the game. Originally, this bot was used to find NPCs, IDs, and Hex Addresses for editing the freeware version of the game at its source. It then evolved into a multipurpose bot as her creator sought to find out what he could accomplish through her. Miza now has expanded into so much more than a bot designed for Cave Story modding and has became a useful part for many people on Discord everyday! She can now play music, convert files, perform many different calculations, graph, show server statistics, user statistics, and so much more. We hope you enjoy exploring Miza's many functions and don't hesitate to ask questions or notify us on issues!