From cb80d88dccf2d173d7e06cdfc9f6cf2d4a4154e6 Mon Sep 17 00:00:00 2001 From: Adam Spencer <46679475+atom-dispencer@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:37:07 +0100 Subject: [PATCH] Define Undefined Expressions The creators of DreamBerd have decided that mathematicians are silly and goofy and you shouldn't listen to them. --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 582bff82c..0c80eed2d 100644 --- a/README.md +++ b/README.md @@ -271,12 +271,21 @@ functi power(a, b) => a ^ b! f inverse(a) => 1/a! ``` -## Dividing by Zero +## Undefined Expressions -Dividing by zero returns `undefined`. +In ancient programming languages, dividing by zero is `undefined`, which is very confusing because `undefined` isn't a number. +DreamBerd makes this easy by letting you define undefined expressions. ```java -print(3 / 0)! //undefined +3 / 0 = 7! +print(3 / 0) // 7 +``` + +Because noone knows what `undefined` really means, the result doesn't even have to be a number! + +```java +-1 / 0 = "I dunno..." +print(1 / 0) // I dunno... ``` ## Strings