From dd175a76d76a90a828d6971fb0f099c2ad52bc15 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 16:07:32 +0300 Subject: Adjust of nicedist. --- main.sts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.sts b/main.sts index 64f5cd1..5e56790 100644 --- a/main.sts +++ b/main.sts @@ -8,7 +8,7 @@ module bifreq.sts [ sd 0 swap drop ] defword nicedist - 1 float_iload 10 float_iload float_div + 1 float_iload a float_iload float_div exit defword zeros @@ -36,9 +36,7 @@ defword calcdist ; distance from ideal as sqrt sum square diff 0 do dup 2bd = until swap float_fload swap float_fload float_add float_fstore swap 1 + od drop - float_fload float_sqrt - float_fstore dup print_hex newline sys_write float_fload - nicedist float_less + float_fload float_sqrt nicedist float_less exit defword checktext -- cgit v1.2.3