1
Add this dependency to the project.
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.2</version>
</dependency>
Just call this function.
double vlr = Erf.erf(x);
System.out.println("valor" + vlr);
Friend, are there any examples of what you have already done? Or how is this function? It would be easier to help!
– Thiago Luiz Domacoski
I edited the question take a look to see if it helps.
– Jose Vieira Neto
@Thiagoluizdomacoski is this function of excel "erfc" want to know how to do it with java. its name is complementary error function. I’m not finding anything
– Jose Vieira Neto
See there: https://commons.apache.org/proper/commons-math/jacoco/org.apache.commons.math3.special/Erf.java.html
– Alexandre Cartaxo
By the way: erfc(x)=1-Erf(x).
– Alexandre Cartaxo
Alexandre worked expensive . but I’m curious about one thing why we always have to subtract for less 1 ?
– Jose Vieira Neto
@Josevieiraneto Because the function erfc(x) is defined from the function Erf(x). The first is just a convenience to not always write 1-Erf(x). The error function (Erf) allows calculating the probability according to the normal distribution. erfc is the complement of this probability.
– Alexandre Cartaxo