4
Entrances
R = new BigDecimal(2.79E+00);
Dxm3d = new BigDecimal(3.99E-04);
Wmd = new BigDecimal(2.39E-03);
x = new BigDecimal(3.2);
t = new BigDecimal(365);
Below is the formula
BigDecimal segundoTermo = (R.multiply(x).subtract(Wmd.multiply(t)).divide(new BigDecimal(2d).multiply(new BigDecimal(Math.sqrt(Dxm3d.multiply(R).multiply(t).doubleValue()))), RoundingMode.HALF_DOWN));
System.out.println("valor do segundo termo pfv:" + segundoTermo);
Value returned
valor do segundo termo pfv:6.31838147917065306052600332590254032941338413886611227745342947009953030493273342105799365116070956364
Expected Value
6,321092458
These J263 values are the execel ballots that represent my variables.
- J253 value: 2,39E-03 represents Wmd
- J254 value: 3,99E-04 represents Dxm3d
- J255 value: 2,79E+00 represents R
- I259 value: 365 represents t
- J263 value : 3,2 represents x
How did you find the expected value?
– Alexandre Cartaxo
Ah. is why these formulas were made by a team of engineers here . which already has a progamma calling Mathcad that makes.
– Jose Vieira Neto
I have an excel here tbm and gives the expected value.
– Jose Vieira Neto
Are you sure the formula is calculating what you want it to calculate, no operators precedence errors?
– Math
@Math will edit to ask by placing the prints of the formulas and results past me.
– Jose Vieira Neto
@Math edited . with the fixed values of the parameters and the formula where I move to java. even so the result does not return the expected
– Jose Vieira Neto
Jose, could you please show all the values (
R
,x
,Wmd
,Dxm3d
, etc)? Preferably just update your code with the /assignment statement of each variable so we can just copy and paste to check the example.– Anthony Accioly
@Anthonyaccioly is pq these variables already depend on other previous values ai I would have to pass the complete class but I put the fixed values of each variables down there the question . can exchange the names of the variables for these values I have placed
– Jose Vieira Neto