From 14c904b06043fa6fbbf5194b838f294248d0a360 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 02:26:01 +0300 Subject: We need more precision. --- main.sts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.sts b/main.sts index c172a33..5159f93 100644 --- a/main.sts +++ b/main.sts @@ -7,7 +7,7 @@ module freq.sts [ sd 0 swap drop ] defword nicedist - 3e9eb852 float_fload + 1 float_iload 2 float_iload float_div exit defword calcdist ; distance from ideal as sqrt sum square diff @@ -43,7 +43,13 @@ defword checktext fi dup dup 'Z' > 0 = swap 'A' < 0 = mul if dup 'Z' swap - word_size mul checktext.fr + dup @ 1 + swap ! checktext.count @ 1 + checktext.count ! - fi drop + fi dup 9 < if drop drop drop + drop drop drop drop drop drop drop drop drop drop drop drop drop + drop drop drop drop drop drop drop drop drop drop drop drop drop + 0 exit fi dup dup 1f > 0 = swap e < 0 = mul if drop drop drop + drop drop drop drop drop drop drop drop drop drop drop drop drop + drop drop drop drop drop drop drop drop drop drop drop drop drop + 0 exit fi drop dup 0 = untilod drop ; ZERO DIVISION SHALL NOT PASS checktext.count 0 = if drop -- cgit v1.2.3