Tabnine Logo
RubyBignum.divmod
Code IndexAdd Tabnine to your IDE (free)

How to use
divmod
method
in
org.jruby.RubyBignum

Best Java code snippets using org.jruby.RubyBignum.divmod (Showing top 6 results out of 315)

origin: com.ning.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "divmod", required = 1, compat = RUBY1_9)
public IRubyObject divmod19(ThreadContext context, IRubyObject other) {
  if (!other.isNil() && other instanceof RubyFloat
      && ((RubyFloat)other).getDoubleValue() == 0) {
    throw context.runtime.newZeroDivisionError();
  }
  return divmod(context, other);
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "divmod", required = 1, compat = RUBY1_9)
public IRubyObject divmod19(ThreadContext context, IRubyObject other) {
  if (!other.isNil() && other instanceof RubyFloat
      && ((RubyFloat)other).getDoubleValue() == 0) {
    throw context.runtime.newZeroDivisionError();
  }
  return divmod(context, other);
}
origin: org.jruby/jruby-complete

while (from instanceof RubyBignum) {
  RubyBignum bignum = (RubyBignum)from;
  RubyArray ary = (RubyArray)bignum.divmod(context, big128);
  buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(context.runtime))) | 0x80) & 0xff);
  from = ary.at(RubyFixnum.zero(context.runtime));
origin: org.jruby/jruby-core

while (from instanceof RubyBignum) {
  RubyBignum bignum = (RubyBignum)from;
  RubyArray ary = (RubyArray)bignum.divmod(context, big128);
  buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(context.runtime))) | 0x80) & 0xff);
  from = ary.at(RubyFixnum.zero(context.runtime));
origin: com.ning.billing/killbill-osgi-bundles-jruby

while (from instanceof RubyBignum) {
  RubyBignum bignum = (RubyBignum)from;
  RubyArray ary = (RubyArray)bignum.divmod(runtime.getCurrentContext(), big128);
  buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(runtime))) | 0x80) & 0xff);
  from = ary.at(RubyFixnum.zero(runtime));
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

while (from instanceof RubyBignum) {
  RubyBignum bignum = (RubyBignum)from;
  RubyArray ary = (RubyArray)bignum.divmod(runtime.getCurrentContext(), big128);
  buf.append((byte)(RubyNumeric.fix2int(ary.at(RubyFixnum.one(runtime))) | 0x80) & 0xff);
  from = ary.at(RubyFixnum.zero(runtime));
org.jrubyRubyBignumdivmod

Javadoc

rb_big_divmod

Popular methods of RubyBignum

  • newBignum
  • getLongValue
  • getValue
    Getter for property value.
  • <init>
  • addFloat
  • addOther
  • big2dbl
    rb_big2dbl
  • big2long
    rb_big2long
  • bignorm
    rb_big_norm
  • checkShiftDown
  • coerceBin
  • coerceCmp
  • coerceBin,
  • coerceCmp,
  • compareTo,
  • convertToDouble,
  • createBignumClass,
  • dbl_cmp,
  • even_p,
  • fix2big,
  • getBigIntegerValue

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Table (org.hibernate.mapping)
    A relational table
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now