Closed tavmem closed 4 years ago
BTW: this can be simplified a bit in k2.8:
$ rlwrap -n ~/k2.8/k
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
Evaluation. Not for commercial use.
\ for help. \\ to exit.
a:_n
a:a//,//
a?1
nonce error
{[f;y;x]u:_abs 1e-6*y+y=0;d:1e-4*x+x=0;t:y-f x;do[20;r:t;d*:t%r-t:y-f x+:d;if[&/u>_abs t;:x+d]];'`limit}
^
>
Crash in kona.
These no longer crash ... but do not yield similar results to k2.8, yet.
kona \ for help. \\ to exit.
a:_n
a:a//,//
a?#a
1.0
kona \ for help. \\ to exit.
a:_n
a:a//,//
a?1
1.0
simpler:
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.
(_n,//,//)?1
type error
{[f;y;x]u:_abs 1e-6*y+y=0;d:1e-4*x+x=0;t:y-f x;do[20;r:t;d*:t%r-t:y-f x+:d;if[&/u>_abs t;:x+d]];'`limit}
^
>
kona \ for help. \\ to exit.
(_n//,//)?1
1.0
oops: last post changed the error message from k2.8 (making it a different issue):
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.
(_n//,//)?1
nonce error
{[f;y;x]u:_abs 1e-6*y+y=0;d:1e-4*x+x=0;t:y-f x;do[20;r:t;d*:t%r-t:y-f x+:d;if[&/u>_abs t;:x+d]];'`limit}
^
>
kona \ for help. \\ to exit.
(_n//,//)?1
1.0
kona \ for help. \\ to exit.
(_n//,//)?1
nonce error
>
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.
(_n//,//)?1
nonce error
{[f;y;x]u:_abs 1e-6*y+y=0;d:1e-4*x+x=0;t:y-f x;do[20;r:t;d*:t%r-t:y-f x+:d;if[&/u>_abs t;:x+d]];'`limit}
^
>
Although this seems a somewhat contrived borderline case, kona should not crash. In kona:
in k2.8: