
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
fma-def99.5%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.4%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -5e+82)
(* a 120.0)
(if (<= (* a 120.0) -15000000000000.0)
t_1
(if (<= (* a 120.0) -4e-42)
(+ (* a 120.0) (* y (/ -60.0 z)))
(if (<= (* a 120.0) 5e-64) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -5e+82) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -15000000000000.0) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-42) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= 5e-64) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-5d+82)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-15000000000000.0d0)) then
tmp = t_1
else if ((a * 120.0d0) <= (-4d-42)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else if ((a * 120.0d0) <= 5d-64) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -5e+82) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -15000000000000.0) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-42) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= 5e-64) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -5e+82: tmp = a * 120.0 elif (a * 120.0) <= -15000000000000.0: tmp = t_1 elif (a * 120.0) <= -4e-42: tmp = (a * 120.0) + (y * (-60.0 / z)) elif (a * 120.0) <= 5e-64: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -5e+82) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -15000000000000.0) tmp = t_1; elseif (Float64(a * 120.0) <= -4e-42) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); elseif (Float64(a * 120.0) <= 5e-64) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -5e+82) tmp = a * 120.0; elseif ((a * 120.0) <= -15000000000000.0) tmp = t_1; elseif ((a * 120.0) <= -4e-42) tmp = (a * 120.0) + (y * (-60.0 / z)); elseif ((a * 120.0) <= 5e-64) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+82], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -15000000000000.0], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-42], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-64], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+82}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -15000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-42}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000015e82 or 5.00000000000000033e-64 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.9%
if -5.00000000000000015e82 < (*.f64 a 120) < -1.5e13 or -4.00000000000000015e-42 < (*.f64 a 120) < 5.00000000000000033e-64Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.0%
if -1.5e13 < (*.f64 a 120) < -4.00000000000000015e-42Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 88.5%
Taylor expanded in x around 0 81.2%
associate-*r/81.2%
*-commutative81.2%
associate-/l*81.2%
Simplified81.2%
div-inv81.2%
clear-num81.2%
Applied egg-rr81.2%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= (- z t) -2e+69)
(* a 120.0)
(if (<= (- z t) -5e-65)
t_1
(if (<= (- z t) -1e-186)
(* -60.0 (/ y (- z t)))
(if (<= (- z t) 1e-31) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if ((z - t) <= -2e+69) {
tmp = a * 120.0;
} else if ((z - t) <= -5e-65) {
tmp = t_1;
} else if ((z - t) <= -1e-186) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 1e-31) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if ((z - t) <= (-2d+69)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d-65)) then
tmp = t_1
else if ((z - t) <= (-1d-186)) then
tmp = (-60.0d0) * (y / (z - t))
else if ((z - t) <= 1d-31) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if ((z - t) <= -2e+69) {
tmp = a * 120.0;
} else if ((z - t) <= -5e-65) {
tmp = t_1;
} else if ((z - t) <= -1e-186) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 1e-31) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if (z - t) <= -2e+69: tmp = a * 120.0 elif (z - t) <= -5e-65: tmp = t_1 elif (z - t) <= -1e-186: tmp = -60.0 * (y / (z - t)) elif (z - t) <= 1e-31: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (Float64(z - t) <= -2e+69) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e-65) tmp = t_1; elseif (Float64(z - t) <= -1e-186) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(z - t) <= 1e-31) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / (z - t)); tmp = 0.0; if ((z - t) <= -2e+69) tmp = a * 120.0; elseif ((z - t) <= -5e-65) tmp = t_1; elseif ((z - t) <= -1e-186) tmp = -60.0 * (y / (z - t)); elseif ((z - t) <= 1e-31) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z - t), $MachinePrecision], -2e+69], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e-65], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], -1e-186], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-31], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;z - t \leq -2 \cdot 10^{+69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{-65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq -1 \cdot 10^{-186}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;z - t \leq 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000001e69 or 1e-31 < (-.f64 z t) Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.5%
if -2.0000000000000001e69 < (-.f64 z t) < -4.99999999999999983e-65 or -9.9999999999999991e-187 < (-.f64 z t) < 1e-31Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 58.8%
if -4.99999999999999983e-65 < (-.f64 z t) < -9.9999999999999991e-187Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 82.3%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -2e+69)
(* a 120.0)
(if (<= (- z t) -5e-65)
(/ 60.0 (/ (- z t) x))
(if (<= (- z t) -1e-186)
(* -60.0 (/ y (- z t)))
(if (<= (- z t) 1e-31) (* 60.0 (/ x (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+69) {
tmp = a * 120.0;
} else if ((z - t) <= -5e-65) {
tmp = 60.0 / ((z - t) / x);
} else if ((z - t) <= -1e-186) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 1e-31) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z - t) <= (-2d+69)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d-65)) then
tmp = 60.0d0 / ((z - t) / x)
else if ((z - t) <= (-1d-186)) then
tmp = (-60.0d0) * (y / (z - t))
else if ((z - t) <= 1d-31) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+69) {
tmp = a * 120.0;
} else if ((z - t) <= -5e-65) {
tmp = 60.0 / ((z - t) / x);
} else if ((z - t) <= -1e-186) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 1e-31) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -2e+69: tmp = a * 120.0 elif (z - t) <= -5e-65: tmp = 60.0 / ((z - t) / x) elif (z - t) <= -1e-186: tmp = -60.0 * (y / (z - t)) elif (z - t) <= 1e-31: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -2e+69) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e-65) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (Float64(z - t) <= -1e-186) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(z - t) <= 1e-31) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -2e+69) tmp = a * 120.0; elseif ((z - t) <= -5e-65) tmp = 60.0 / ((z - t) / x); elseif ((z - t) <= -1e-186) tmp = -60.0 * (y / (z - t)); elseif ((z - t) <= 1e-31) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -2e+69], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e-65], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -1e-186], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-31], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;z - t \leq -1 \cdot 10^{-186}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;z - t \leq 10^{-31}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000001e69 or 1e-31 < (-.f64 z t) Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.5%
if -2.0000000000000001e69 < (-.f64 z t) < -4.99999999999999983e-65Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 54.1%
associate-*r/54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in x around 0 54.1%
associate-*r/54.1%
associate-/l*54.1%
Simplified54.1%
if -4.99999999999999983e-65 < (-.f64 z t) < -9.9999999999999991e-187Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 82.3%
if -9.9999999999999991e-187 < (-.f64 z t) < 1e-31Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 61.5%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -2e+69)
(* a 120.0)
(if (<= (- z t) -5e-65)
(/ 60.0 (/ (- z t) x))
(if (<= (- z t) -1e-186)
(/ y (/ (- z t) -60.0))
(if (<= (- z t) 1e-31) (* 60.0 (/ x (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+69) {
tmp = a * 120.0;
} else if ((z - t) <= -5e-65) {
tmp = 60.0 / ((z - t) / x);
} else if ((z - t) <= -1e-186) {
tmp = y / ((z - t) / -60.0);
} else if ((z - t) <= 1e-31) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z - t) <= (-2d+69)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d-65)) then
tmp = 60.0d0 / ((z - t) / x)
else if ((z - t) <= (-1d-186)) then
tmp = y / ((z - t) / (-60.0d0))
else if ((z - t) <= 1d-31) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+69) {
tmp = a * 120.0;
} else if ((z - t) <= -5e-65) {
tmp = 60.0 / ((z - t) / x);
} else if ((z - t) <= -1e-186) {
tmp = y / ((z - t) / -60.0);
} else if ((z - t) <= 1e-31) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -2e+69: tmp = a * 120.0 elif (z - t) <= -5e-65: tmp = 60.0 / ((z - t) / x) elif (z - t) <= -1e-186: tmp = y / ((z - t) / -60.0) elif (z - t) <= 1e-31: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -2e+69) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e-65) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (Float64(z - t) <= -1e-186) tmp = Float64(y / Float64(Float64(z - t) / -60.0)); elseif (Float64(z - t) <= 1e-31) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -2e+69) tmp = a * 120.0; elseif ((z - t) <= -5e-65) tmp = 60.0 / ((z - t) / x); elseif ((z - t) <= -1e-186) tmp = y / ((z - t) / -60.0); elseif ((z - t) <= 1e-31) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -2e+69], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e-65], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -1e-186], N[(y / N[(N[(z - t), $MachinePrecision] / -60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-31], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;z - t \leq -1 \cdot 10^{-186}:\\
\;\;\;\;\frac{y}{\frac{z - t}{-60}}\\
\mathbf{elif}\;z - t \leq 10^{-31}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000001e69 or 1e-31 < (-.f64 z t) Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.5%
if -2.0000000000000001e69 < (-.f64 z t) < -4.99999999999999983e-65Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 54.1%
associate-*r/54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in x around 0 54.1%
associate-*r/54.1%
associate-/l*54.1%
Simplified54.1%
if -4.99999999999999983e-65 < (-.f64 z t) < -9.9999999999999991e-187Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 99.7%
*-commutative99.7%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around 0 82.3%
associate-*r/82.4%
*-commutative82.4%
associate-/l*82.4%
Simplified82.4%
if -9.9999999999999991e-187 < (-.f64 z t) < 1e-31Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 61.5%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x t))))
(if (<= a -1.55e+61)
(* a 120.0)
(if (<= a -3.3e+18)
(/ (* 60.0 y) t)
(if (<= a -1.3e-47)
(* a 120.0)
(if (<= a -4.7e-101)
t_1
(if (<= a -5.6e-172)
(* a 120.0)
(if (<= a -2.2e-251)
t_1
(if (<= a 1.45e-159)
(* -60.0 (/ y (- z t)))
(* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -1.55e+61) {
tmp = a * 120.0;
} else if (a <= -3.3e+18) {
tmp = (60.0 * y) / t;
} else if (a <= -1.3e-47) {
tmp = a * 120.0;
} else if (a <= -4.7e-101) {
tmp = t_1;
} else if (a <= -5.6e-172) {
tmp = a * 120.0;
} else if (a <= -2.2e-251) {
tmp = t_1;
} else if (a <= 1.45e-159) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (x / t)
if (a <= (-1.55d+61)) then
tmp = a * 120.0d0
else if (a <= (-3.3d+18)) then
tmp = (60.0d0 * y) / t
else if (a <= (-1.3d-47)) then
tmp = a * 120.0d0
else if (a <= (-4.7d-101)) then
tmp = t_1
else if (a <= (-5.6d-172)) then
tmp = a * 120.0d0
else if (a <= (-2.2d-251)) then
tmp = t_1
else if (a <= 1.45d-159) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -1.55e+61) {
tmp = a * 120.0;
} else if (a <= -3.3e+18) {
tmp = (60.0 * y) / t;
} else if (a <= -1.3e-47) {
tmp = a * 120.0;
} else if (a <= -4.7e-101) {
tmp = t_1;
} else if (a <= -5.6e-172) {
tmp = a * 120.0;
} else if (a <= -2.2e-251) {
tmp = t_1;
} else if (a <= 1.45e-159) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / t) tmp = 0 if a <= -1.55e+61: tmp = a * 120.0 elif a <= -3.3e+18: tmp = (60.0 * y) / t elif a <= -1.3e-47: tmp = a * 120.0 elif a <= -4.7e-101: tmp = t_1 elif a <= -5.6e-172: tmp = a * 120.0 elif a <= -2.2e-251: tmp = t_1 elif a <= 1.45e-159: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / t)) tmp = 0.0 if (a <= -1.55e+61) tmp = Float64(a * 120.0); elseif (a <= -3.3e+18) tmp = Float64(Float64(60.0 * y) / t); elseif (a <= -1.3e-47) tmp = Float64(a * 120.0); elseif (a <= -4.7e-101) tmp = t_1; elseif (a <= -5.6e-172) tmp = Float64(a * 120.0); elseif (a <= -2.2e-251) tmp = t_1; elseif (a <= 1.45e-159) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (x / t); tmp = 0.0; if (a <= -1.55e+61) tmp = a * 120.0; elseif (a <= -3.3e+18) tmp = (60.0 * y) / t; elseif (a <= -1.3e-47) tmp = a * 120.0; elseif (a <= -4.7e-101) tmp = t_1; elseif (a <= -5.6e-172) tmp = a * 120.0; elseif (a <= -2.2e-251) tmp = t_1; elseif (a <= 1.45e-159) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.55e+61], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.3e+18], N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, -1.3e-47], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.7e-101], t$95$1, If[LessEqual[a, -5.6e-172], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.2e-251], t$95$1, If[LessEqual[a, 1.45e-159], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{+61}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{+18}:\\
\;\;\;\;\frac{60 \cdot y}{t}\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{-47}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -4.7 \cdot 10^{-101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -5.6 \cdot 10^{-172}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-159}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.55e61 or -3.3e18 < a < -1.3e-47 or -4.6999999999999999e-101 < a < -5.60000000000000023e-172 or 1.44999999999999995e-159 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.3%
if -1.55e61 < a < -3.3e18Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 85.7%
*-commutative85.7%
associate-*l/85.9%
Simplified85.9%
Taylor expanded in z around 0 86.5%
associate-*r/86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in x around 0 72.9%
*-commutative72.9%
Simplified72.9%
if -1.3e-47 < a < -4.6999999999999999e-101 or -5.60000000000000023e-172 < a < -2.2e-251Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 67.1%
associate-*r/67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in z around 0 56.5%
if -2.2e-251 < a < 1.44999999999999995e-159Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 54.7%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -4e-42) (not (<= (* a 120.0) 2e-102))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -4e-42) || !((a * 120.0) <= 2e-102)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-4d-42)) .or. (.not. ((a * 120.0d0) <= 2d-102))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -4e-42) || !((a * 120.0) <= 2e-102)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -4e-42) or not ((a * 120.0) <= 2e-102): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -4e-42) || !(Float64(a * 120.0) <= 2e-102)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -4e-42) || ~(((a * 120.0) <= 2e-102))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-42], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-102]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-42} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-102}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000015e-42 or 1.99999999999999987e-102 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.1%
if -4.00000000000000015e-42 < (*.f64 a 120) < 1.99999999999999987e-102Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.0%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.15e+79)
(and (not (<= a -100000000000.0))
(or (<= a -1e-44) (not (<= a 7.4e-59)))))
(* a 120.0)
(* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e+79) || (!(a <= -100000000000.0) && ((a <= -1e-44) || !(a <= 7.4e-59)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.15d+79)) .or. (.not. (a <= (-100000000000.0d0))) .and. (a <= (-1d-44)) .or. (.not. (a <= 7.4d-59))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e+79) || (!(a <= -100000000000.0) && ((a <= -1e-44) || !(a <= 7.4e-59)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.15e+79) or (not (a <= -100000000000.0) and ((a <= -1e-44) or not (a <= 7.4e-59))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.15e+79) || (!(a <= -100000000000.0) && ((a <= -1e-44) || !(a <= 7.4e-59)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.15e+79) || (~((a <= -100000000000.0)) && ((a <= -1e-44) || ~((a <= 7.4e-59))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.15e+79], And[N[Not[LessEqual[a, -100000000000.0]], $MachinePrecision], Or[LessEqual[a, -1e-44], N[Not[LessEqual[a, 7.4e-59]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+79} \lor \neg \left(a \leq -100000000000\right) \land \left(a \leq -1 \cdot 10^{-44} \lor \neg \left(a \leq 7.4 \cdot 10^{-59}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.15e79 or -1e11 < a < -9.99999999999999953e-45 or 7.3999999999999998e-59 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.1%
if -1.15e79 < a < -1e11 or -9.99999999999999953e-45 < a < 7.3999999999999998e-59Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.0%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -1e+70) (not (<= (- z t) 1e-60))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -1e+70) || !((z - t) <= 1e-60)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) <= (-1d+70)) .or. (.not. ((z - t) <= 1d-60))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -1e+70) || !((z - t) <= 1e-60)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -1e+70) or not ((z - t) <= 1e-60): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -1e+70) || !(Float64(z - t) <= 1e-60)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -1e+70) || ~(((z - t) <= 1e-60))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -1e+70], N[Not[LessEqual[N[(z - t), $MachinePrecision], 1e-60]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{+70} \lor \neg \left(z - t \leq 10^{-60}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 z t) < -1.00000000000000007e70 or 9.9999999999999997e-61 < (-.f64 z t) Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 64.9%
if -1.00000000000000007e70 < (-.f64 z t) < 9.9999999999999997e-61Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 82.9%
*-commutative82.9%
associate-*l/82.9%
Simplified82.9%
Taylor expanded in z around 0 54.1%
Final simplification62.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.2e+69) (not (<= y 6e+28))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (+ (* (/ 60.0 (- z t)) x) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.2e+69) || !(y <= 6e+28)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.2d+69)) .or. (.not. (y <= 6d+28))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.2e+69) || !(y <= 6e+28)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.2e+69) or not (y <= 6e+28): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.2e+69) || !(y <= 6e+28)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.2e+69) || ~((y <= 6e+28))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = ((60.0 / (z - t)) * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.2e+69], N[Not[LessEqual[y, 6e+28]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+69} \lor \neg \left(y \leq 6 \cdot 10^{+28}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if y < -1.2000000000000001e69 or 6.0000000000000002e28 < y Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.4%
if -1.2000000000000001e69 < y < 6.0000000000000002e28Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 95.0%
associate-*r/95.0%
associate-*l/95.0%
*-commutative95.0%
Simplified95.0%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.9e+65)
(+ (/ -60.0 (/ (- z t) y)) (* a 120.0))
(if (<= y 3.95e+30)
(+ (* (/ 60.0 (- z t)) x) (* a 120.0))
(+ (* a 120.0) (* -60.0 (/ y (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.9e+65) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else if (y <= 3.95e+30) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.9d+65)) then
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
else if (y <= 3.95d+30) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.9e+65) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else if (y <= 3.95e+30) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.9e+65: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) elif y <= 3.95e+30: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.9e+65) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); elseif (y <= 3.95e+30) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.9e+65) tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); elseif (y <= 3.95e+30) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.9e+65], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.95e+30], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+65}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{elif}\;y \leq 3.95 \cdot 10^{+30}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if y < -2.9e65Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.0%
associate-*r/88.0%
associate-/l*88.0%
Simplified88.0%
if -2.9e65 < y < 3.94999999999999981e30Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 95.0%
associate-*r/95.0%
associate-*l/95.0%
*-commutative95.0%
Simplified95.0%
if 3.94999999999999981e30 < y Initial program 97.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 88.8%
Final simplification92.2%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 / (z - t)) * (x - y)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -9.5e+220) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.5e+220) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-9.5d+220)) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.5e+220) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -9.5e+220: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -9.5e+220) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -9.5e+220) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.5e+220], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+220}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -9.50000000000000084e220Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 70.6%
associate-*r/70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in z around 0 58.4%
if -9.50000000000000084e220 < x Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.1%
Final simplification55.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.4e+221) (/ (* x -60.0) t) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.4e+221) {
tmp = (x * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.4d+221)) then
tmp = (x * (-60.0d0)) / t
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.4e+221) {
tmp = (x * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.4e+221: tmp = (x * -60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.4e+221) tmp = Float64(Float64(x * -60.0) / t); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.4e+221) tmp = (x * -60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.4e+221], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+221}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.39999999999999994e221Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 70.6%
Taylor expanded in z around 0 58.4%
associate-*r/58.5%
Simplified58.5%
if -1.39999999999999994e221 < x Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.1%
Final simplification55.4%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.1%
Final simplification53.1%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023202
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))