mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.10.2t30
This commit is contained in:
31
help/near
Normal file
31
help/near
Normal file
@@ -0,0 +1,31 @@
|
||||
NAME
|
||||
near - compare nearness of two numbers with a standard
|
||||
|
||||
SYNOPSIS
|
||||
near(x, y [,eps])
|
||||
|
||||
TYPES
|
||||
x real
|
||||
y real
|
||||
eps real, defaults to epsilon()
|
||||
|
||||
return -1, 0 or 1
|
||||
|
||||
DESCRIPTION
|
||||
Returns:
|
||||
-1 if abs(x - y) < abs(eps)
|
||||
0 if abs(x - y) = abs(eps)
|
||||
1 if abs(x - y) > abs(eps)
|
||||
|
||||
EXAMPLE
|
||||
> print near(22/7, 3.15, .01), near(22/7, 3.15, .005)
|
||||
-1 1
|
||||
|
||||
LIMITS
|
||||
eps >= 0
|
||||
|
||||
LIBRARY
|
||||
FLAG qnear(NUMBER *x, NUMBER *y, NUMBER *eps)
|
||||
|
||||
SEE ALSO
|
||||
epsilon, abs
|
Reference in New Issue
Block a user