congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
AsinCalculator
Code IndexAdd Tabnine to your IDE (free)

How to use
AsinCalculator
in
ch.obermuhlner.math.big.internal

Best Java code snippets using ch.obermuhlner.math.big.internal.AsinCalculator (Showing top 2 results out of 315)

origin: eobermuhlner/big-math

public static BigDecimal asin(BigDecimal x, MathContext mathContext) {
  if (x.compareTo(ONE) > 0) {
    throw new ArithmeticException("Illegal asin(x) for x > 1: x = " + x);
  }
  if (x.compareTo(MINUS_ONE) < 0) {
    throw new ArithmeticException("Illegal asin(x) for x < -1: x = " + x);
  }
  
  if (x.signum() == -1) {
    return asin(x.negate(), mathContext).negate();
  }
  
  MathContext mc = new MathContext(mathContext.getPrecision() + 6, mathContext.getRoundingMode());
  if (x.compareTo(BigDecimal.valueOf(0.707107)) >= 0) {
    BigDecimal xTransformed = BigDecimalMath.sqrt(ONE.subtract(x.multiply(x, mc), mc), mc);
    return acos(xTransformed, mathContext);
  }
  BigDecimal result = AsinCalculator.INSTANCE.calculate(x, mc);
  return result.round(mathContext);
}
origin: eobermuhlner/big-math

BigDecimal result = AsinCalculator.INSTANCE.calculate(x, mc);
return result.round(mathContext);
ch.obermuhlner.math.big.internalAsinCalculator

Javadoc

Calculates arc sinus using the Maclaurin series.

See Wikipedia: Taylorreihe

No argument checking or optimizations are done. This implementation is not intended to be called directly.

Most used methods

  • calculate

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Notification (javax.management)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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