(FPCore (K m n M l)
:precision binary64
(*
(cos (- (/ (* K (+ m n)) 2.0) M))
(exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))
↓
(FPCore (K m n M l)
:precision binary64
(* (cos M) (exp (- (- (fabs (- m n)) l) (pow (- (/ (+ m n) 2.0) M) 2.0)))))
double code(double K, double m, double n, double M, double l) {
return cos((((K * (m + n)) / 2.0) - M)) * exp((-pow((((m + n) / 2.0) - M), 2.0) - (l - fabs((m - n)))));
}
↓
double code(double K, double m, double n, double M, double l) {
return cos(M) * exp(((fabs((m - n)) - l) - pow((((m + n) / 2.0) - M), 2.0)));
}
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = cos((((k * (m + n)) / 2.0d0) - m_1)) * exp((-((((m + n) / 2.0d0) - m_1) ** 2.0d0) - (l - abs((m - n)))))
end function
↓
real(8) function code(k, m, n, m_1, l)
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8), intent (in) :: n
real(8), intent (in) :: m_1
real(8), intent (in) :: l
code = cos(m_1) * exp(((abs((m - n)) - l) - ((((m + n) / 2.0d0) - m_1) ** 2.0d0)))
end function
public static double code(double K, double m, double n, double M, double l) {
return Math.cos((((K * (m + n)) / 2.0) - M)) * Math.exp((-Math.pow((((m + n) / 2.0) - M), 2.0) - (l - Math.abs((m - n)))));
}
↓
public static double code(double K, double m, double n, double M, double l) {
return Math.cos(M) * Math.exp(((Math.abs((m - n)) - l) - Math.pow((((m + n) / 2.0) - M), 2.0)));
}
def code(K, m, n, M, l):
return math.cos((((K * (m + n)) / 2.0) - M)) * math.exp((-math.pow((((m + n) / 2.0) - M), 2.0) - (l - math.fabs((m - n)))))
↓
def code(K, m, n, M, l):
return math.cos(M) * math.exp(((math.fabs((m - n)) - l) - math.pow((((m + n) / 2.0) - M), 2.0)))
function code(K, m, n, M, l)
return Float64(cos(Float64(Float64(Float64(K * Float64(m + n)) / 2.0) - M)) * exp(Float64(Float64(-(Float64(Float64(Float64(m + n) / 2.0) - M) ^ 2.0)) - Float64(l - abs(Float64(m - n))))))
end
↓
function code(K, m, n, M, l)
return Float64(cos(M) * exp(Float64(Float64(abs(Float64(m - n)) - l) - (Float64(Float64(Float64(m + n) / 2.0) - M) ^ 2.0))))
end
function tmp = code(K, m, n, M, l)
tmp = cos((((K * (m + n)) / 2.0) - M)) * exp((-((((m + n) / 2.0) - M) ^ 2.0) - (l - abs((m - n)))));
end
↓
function tmp = code(K, m, n, M, l)
tmp = cos(M) * exp(((abs((m - n)) - l) - ((((m + n) / 2.0) - M) ^ 2.0)));
end
(*.f64 (cos.f64 (-.f64 (*.f64 (+.f64 m n) (/.f64 K 2)) M)) (exp.f64 (-.f64 (-.f64 (fabs.f64 (-.f64 m n)) l) (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (+.f64 m n) K) 2)) M)) (exp.f64 (-.f64 (-.f64 (fabs.f64 (-.f64 m n)) l) (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 K (+.f64 m n))) 2) M)) (exp.f64 (-.f64 (-.f64 (fabs.f64 (-.f64 m n)) l) (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (Rewrite=> associate--l-_binary64 (-.f64 (fabs.f64 (-.f64 m n)) (+.f64 l (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)))))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (-.f64 (fabs.f64 (-.f64 m n)) (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2) l))))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (Rewrite=> associate--r+_binary64 (-.f64 (-.f64 (fabs.f64 (-.f64 m n)) (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)) l)))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (-.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (fabs.f64 (-.f64 m n)) (neg.f64 (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)))) l))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (Rewrite<= associate-+r-_binary64 (+.f64 (fabs.f64 (-.f64 m n)) (-.f64 (neg.f64 (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)) l))))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (Rewrite<= +-commutative_binary64 (+.f64 (-.f64 (neg.f64 (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)) l) (fabs.f64 (-.f64 m n)))))): 0 points increase in error, 0 points decrease in error
(*.f64 (cos.f64 (-.f64 (/.f64 (*.f64 K (+.f64 m n)) 2) M)) (exp.f64 (Rewrite<= associate--r-_binary64 (-.f64 (neg.f64 (pow.f64 (-.f64 (/.f64 (+.f64 m n) 2) M) 2)) (-.f64 l (fabs.f64 (-.f64 m n))))))): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022325
(FPCore (K m n M l)
:name "Maksimov and Kolovsky, Equation (32)"
:precision binary64
(* (cos (- (/ (* K (+ m n)) 2.0) M)) (exp (- (- (pow (- (/ (+ m n) 2.0) M) 2.0)) (- l (fabs (- m n)))))))