From 69b3681697f882613fc77fbdd377189bb2d1cdc4 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 12 May 2024 18:10:25 +0100 Subject: [PATCH] fix distributional division --- README.md | 1 + f.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 25879b5..290444d 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ Conceptually clearer to have all the multiplications first and then all the divi - [x] Allow comments? - [x] Use a sed filter? - [x] Add show more info version +- [x] Scalar multiplication and division - [ ] Program into a small device, like a calculator? - [ ] Think of some way of calling bc - [ ] Think how to integrate with squiggle.c to draw samples diff --git a/f.go b/f.go index 1e3aa64..a1c5851 100644 --- a/f.go +++ b/f.go @@ -128,6 +128,9 @@ EventForLoop: fmt.Println(error_msg_cont) continue EventForLoop } + tmp := new_low + new_low = 1.0 / new_high + new_high = 1.0 / tmp default: fmt.Println("Trying to divide by something, but this something is neither a scalar nor a distribution") }