From fd89e9b5327bdcbad8a29402e0be48069d98aa1d Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sat, 17 Jul 2021 13:17:16 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20root,=20log,=20round,=20ceil,?= =?UTF-8?q?=20floor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ideas-1.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ideas-1.sh b/ideas-1.sh index e3f905f..9b80d65 100644 --- a/ideas-1.sh +++ b/ideas-1.sh @@ -33,6 +33,21 @@ mod $1 $2 ... # $1 ^ $2 ^ ... => $1 pow $1 $2 ... +# root of $1 (power = $2; if not given: square-root) => $1 +root $1 $2 + +# log of $1 (base = $2; if not given: base = 10) => $1 +log $1 $2 + +# round to the nearest integer (.000 - .499 => round down; .500 - 0.999 => round up) => $1 +round $1 + +# round up to the next integer => $1 +ceil $1 + +# round down to the last integer => $1 +floor $1 + ## CONDITIONS ##