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

How to use
fdivFloat
method
in
org.jruby.RubyBignum

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

origin: org.jruby/jruby-complete

@Override
public IRubyObject fdivDouble(ThreadContext context, IRubyObject y) {
  double dx, dy;
  dx = getDoubleValue();
  if (y instanceof RubyFixnum) {
    long ly = ((RubyFixnum) y).getLongValue();
    if (Double.isInfinite(dx)) {
      return fdivInt(context.runtime, BigDecimal.valueOf(ly));
    }
    dy = (double) ly;
  } else if (y instanceof RubyBignum) {
    return fdivDouble(context, (RubyBignum) y);
  } else if (y instanceof RubyFloat) {
    dy = ((RubyFloat) y).getDoubleValue();
    if (Double.isNaN(dy)) {
      return context.runtime.newFloat(dy);
    }
    if (Double.isInfinite(dx)) {
      return fdivFloat(context, (RubyFloat) y);
    }
  } else {
    return coerceBin(context, sites(context).fdiv, y);
  }
  return context.runtime.newFloat(dx / dy);
}
origin: org.jruby/jruby-core

@Override
public IRubyObject fdivDouble(ThreadContext context, IRubyObject y) {
  double dx, dy;
  dx = getDoubleValue();
  if (y instanceof RubyFixnum) {
    long ly = ((RubyFixnum) y).getLongValue();
    if (Double.isInfinite(dx)) {
      return fdivInt(context.runtime, BigDecimal.valueOf(ly));
    }
    dy = (double) ly;
  } else if (y instanceof RubyBignum) {
    return fdivDouble(context, (RubyBignum) y);
  } else if (y instanceof RubyFloat) {
    dy = ((RubyFloat) y).getDoubleValue();
    if (Double.isNaN(dy)) {
      return context.runtime.newFloat(dy);
    }
    if (Double.isInfinite(dx)) {
      return fdivFloat(context, (RubyFloat) y);
    }
  } else {
    return coerceBin(context, sites(context).fdiv, y);
  }
  return context.runtime.newFloat(dx / dy);
}
org.jrubyRubyBignumfdivFloat

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,
  • divmod,
  • even_p,
  • fix2big,
  • getBigIntegerValue

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • BoxLayout (javax.swing)
  • JLabel (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • CodeWhisperer alternatives
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