{"id":539,"date":"2024-11-09T10:23:00","date_gmt":"2024-11-09T10:23:00","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=539"},"modified":"2026-01-12T14:57:14","modified_gmt":"2026-01-12T14:57:14","slug":"included-math-functions","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/included-math-functions\/","title":{"rendered":"Included Math Functions"},"content":{"rendered":"<p>Mwnci mathematical functions that are not part of the builtin functions can be loaded with<\/p>\n<pre>include(\"math\")<\/pre>\n<h2>Functions<\/h2>\n<div class=\"table-wrap\">\n<table class=\"confluenceTable\">\n<tbody>\n<tr>\n<td class=\"confluenceTd\"><strong>Command<\/strong><\/td>\n<td class=\"confluenceTd\"><strong>Definition<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-ceil-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">ceil()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Rounds a number UP to the nearest integer, if necessary, and returns the result.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-degrees-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">degrees()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the conversion of an angle from radians to degrees.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-dim-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">dim()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the maximum of a-b, or 0 .<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-exp-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">exp()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns E raised to the power of x.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-exp2-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">exp2()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns x raised to the power of 2.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-expm1-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">expm1()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns E raised to the power of x, minus 1.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-factorial-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">factorial()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the factorial of a number.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-floor-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">floor()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Rounds a number DOWN to the nearest integer, if necessary, and returns the result.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-fmod-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">fmod()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the floating point remainder of (x\/y).<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-gcd-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">gcd()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the greatest common divisor of two integers.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-highest-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">highest()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the largest of two numbers.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-hypot-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">hypot()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the hypotenuse of a right-angled triangle.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isprime-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isprime()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns true if the integer is a prime number.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-lcm-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">lcm()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Return the least common multiple of the specified integer arguments.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-lowest-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">lowest()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the lowest of two numbers.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-modf-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">modf()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the fractional and integer parts of a numeric value.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-pow-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">pow()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the value of x to the power of y.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-pow10-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">pow10()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the value of 10 to the power of x.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-radians-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">radians()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the conversion of an angle from degrees to radians.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-round-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">round()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns a floating point number that is a rounded version of the specified number.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-trunc-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">trunc()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns returns the truncated integer part of a number.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Mwnci mathematical functions that are not part of the builtin functions can be loaded with include(&#8220;math&#8221;) Functions Command Definition ceil() Rounds a number UP to the nearest integer, if necessary, and returns the result. degrees() Returns the conversion of an angle from radians to degrees. dim() Returns the maximum of a-b, or 0 . exp() &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/included-math-functions\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Included Math Functions&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-539","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=539"}],"version-history":[{"count":15,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/539\/revisions"}],"predecessor-version":[{"id":1308,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/539\/revisions\/1308"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}