WL#368: near function
Status: Assigned
...perhaps a NEAR function could be added; as a config file or compile-time
option, you could define an accuracy range. Say,
./config --with-epsilon=0.0001
(if memory of my numerical analysis classes serves, the 'fudge factor' was
conventionally symbolized by epsilon; I suppose you could make it
--with-fudge, but this ain't no bakery) so that
select 1.0 near 1.00009 => 1
and
select 1.0 near 0.9995 => 0
The default would be current behavior (epsilon=0).
This would avoid statements like
select * where x > 0.99999999 and x < 1.00000
Copyright (c) 2000, 2025, Oracle Corporation and/or its affiliates. All rights reserved.