0

I'd like to translate these formula in java:

=100*((0.1/G10)+1)*EXP(-0.1/G10)

Where my G10 is my spacing1. I did it these way:

Double rqd1, rqd2, rqd3;

rqd1 = (0.1 / spacing1 + 1) * 100;
rqd2 = Math.exp (-0.1 / spacing1);
rqd3 = rqd1 * rqd2;

rqd3 will be the answer. Am I doing it the right way?

luwionline
  • 186
  • 2
  • 12

1 Answers1

0

Why not

rqd1 = (0.1 / spacing1 + 1) * 100 * Math.exp (-0.1 / spacing1);
Roberto Anić Banić
  • 1,411
  • 10
  • 21