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:
38
help/num
Normal file
38
help/num
Normal file
@@ -0,0 +1,38 @@
|
||||
NAME
|
||||
num - numerator of a real number
|
||||
|
||||
SYNOPSIS
|
||||
num(x)
|
||||
|
||||
TYPES
|
||||
x real
|
||||
|
||||
return integer
|
||||
|
||||
DESCRIPTION
|
||||
For real x, den(x) returns the denominator of x. In calc,
|
||||
real values are actually rational values. Each calc real
|
||||
value can be uniquely expressed as:
|
||||
|
||||
n / d
|
||||
|
||||
where:
|
||||
|
||||
n and d are integers
|
||||
gcd(n,d) == 1
|
||||
d > 0
|
||||
|
||||
If x = n/x, then den(x) == n.
|
||||
|
||||
EXAMPLE
|
||||
> print num(7), num(-1.25), num(121/33)
|
||||
7 -5 11
|
||||
|
||||
LIMITS
|
||||
none
|
||||
|
||||
LIBRARY
|
||||
NUMBER *qnum(NUMBER *x)
|
||||
|
||||
SEE ALSO
|
||||
den
|
Reference in New Issue
Block a user