Top Inners Fields Constructors Methods
org.jruby.util

public Class Numeric

extends Object
Class Inheritance
Imports
org.joni.Regex, .WarnCallback, org.jcodings.specific.ASCIIEncoding, org.jruby.Ruby, .RubyBignum, .RubyComplex, .RubyFixnum, .RubyFloat, .RubyInteger, .RubyNumeric, .RubyRational, org.jruby.runtime.JavaSites, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CachingCallSite, java.math.BigInteger

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
public static final boolean
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static RubyNumeric
bignumIntPow(ThreadContext context, long x, long y, Ruby runtime, long z, boolean neg)

public static void
checkInteger(ThreadContext context, IRubyObject obj)
Deprecated

public static IRubyObject
f_abs(ThreadContext context, IRubyObject x)

f_abs

public static RubyInteger
public static RubyFloat
public static IRubyObject
f_abs2(ThreadContext context, IRubyObject x)

f_abs2

public static IRubyObject
public static RubyInteger
public static IRubyObject
f_arg(ThreadContext context, IRubyObject x)

f_arg

public static IRubyObject
public static RubyFixnum
public static RubyFixnum
f_cmp(ThreadContext context, RubyInteger x, long y)

public static IRubyObject
f_conjugate(ThreadContext context, IRubyObject x)

f_conjugate

public static IRubyObject
f_denominator(ThreadContext context, IRubyObject x)

f_denominator

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static boolean
public static IRubyObject
f_equal(ThreadContext context, IRubyObject a, IRubyObject b)

f_equal Note: This may not return a value which is a boolean.

public static IRubyObject
public static boolean
f_exact_p(ThreadContext context, IRubyObject x)

f_exact_p

public static IRubyObject
public static RubyNumeric
public static IRubyObject
f_floor(ThreadContext context, IRubyObject x)

f_floor

public static IRubyObject
public static RubyInteger
public static boolean
public static boolean
public static IRubyObject
public static RubyInteger
public static IRubyObject
f_inspect(ThreadContext context, IRubyObject x)

f_inspect

public static boolean
f_integer_p(ThreadContext context, IRubyObject x)

f_integer_p

public static boolean
public static IRubyObject
public static IRubyObject
public static boolean
public static boolean
public static boolean
f_minus_one_p(ThreadContext context, IRubyObject x)

f_minus_one_p

public static IRubyObject
public static IRubyObject
public static RubyInteger
public static IRubyObject
f_negate(ThreadContext context, IRubyObject x)

f_negate

public static RubyInteger
public static boolean
f_negative_p(ThreadContext context, IRubyObject x)

f_negative_p

public static boolean
public static boolean
public static IRubyObject
f_numerator(ThreadContext context, IRubyObject x)

f_numerator

public static boolean
f_odd_p(ThreadContext context, IRubyObject i)

f_odd_p

public static boolean
f_one_p(ThreadContext context, IRubyObject x)

f_one_p

public static IRubyObject
f_polar(ThreadContext context, IRubyObject x)

f_polar

public static IRubyObject
public static IRubyObject
public static boolean
f_real_p(ThreadContext context, IRubyObject x)

f_real_p

public static IRubyObject
f_reciprocal(ThreadContext context, IRubyObject x)

MRI: f_reciprocal

public static IRubyObject
public static IRubyObject
public static RubyInteger
public static IRubyObject
f_to_f(ThreadContext context, IRubyObject x)

f_to_f

public static IRubyObject
f_to_i(ThreadContext context, IRubyObject x)

f_to_i

public static IRubyObject
f_to_r(ThreadContext context, IRubyObject x)

f_to_r

public static RubyNumeric
public static IRubyObject
f_to_s(ThreadContext context, IRubyObject x)

f_to_s

public static IRubyObject
f_truncate(ThreadContext context, IRubyObject x)

f_truncate

public static IRubyObject
public static IRubyObject
public static boolean
f_zero_p(ThreadContext context, IRubyObject x)

f_zero_p

public static boolean
pack-priv static boolean
fitSqrtLong(long n)

private static boolean
private static boolean
public static double
frexp(double mantissa, long[] e)

public static long
i_gcd(long x, long y)

i_gcd

public static long
public static long
public static RubyNumeric
int_pow(ThreadContext context, long x, long y)

protected static boolean

Returns:

true if it is equal to Long.MAX_VALUE, false otherwise.
isLongMinValue
(RubyFixnum
the Fixnum to compare
x
)

Check if the Fixnum passed is equal to Long.MAX_VALUE.

public static boolean
public static boolean
k_exact_zero_p(ThreadContext context, IRubyObject x)

MRI: k_exact_zero_p

public static boolean
public static boolean
public static boolean
public static double
ldexp(double f, long e)

public static boolean
multiplyOverflows(long a, long b)

public static IRubyObject
public static IRubyObject[]
public static IRubyObject[]
public static long

Returns:

the rotated value
rotl
(long
the bits to rotate
bits
,
int
how many bit positions to rotate
rot
)

Rotate the given long bits left.

public static long

Returns:

the rotated value
rotr
(long
the bits to rotate
bits
,
int
how many bit positions to rotate
rot
)

Rotate the given long bits right.

public static IRubyObject
safe_mul(ThreadContext context, IRubyObject a, IRubyObject b, boolean az, boolean bz)

private static JavaSites.NumericSites
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait