
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (+ x (* (- y x) (/ z t))) 4e+306) (+ x (/ (- y x) (/ t z))) (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x + ((y - x) * (z / t))) <= 4e+306) {
tmp = x + ((y - x) / (t / z));
} else {
tmp = ((y - x) * z) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x + ((y - x) * (z / t))) <= 4d+306) then
tmp = x + ((y - x) / (t / z))
else
tmp = ((y - x) * z) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x + ((y - x) * (z / t))) <= 4e+306) {
tmp = x + ((y - x) / (t / z));
} else {
tmp = ((y - x) * z) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x + ((y - x) * (z / t))) <= 4e+306: tmp = x + ((y - x) / (t / z)) else: tmp = ((y - x) * z) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x + Float64(Float64(y - x) * Float64(z / t))) <= 4e+306) tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z))); else tmp = Float64(Float64(Float64(y - x) * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x + ((y - x) * (z / t))) <= 4e+306) tmp = x + ((y - x) / (t / z)); else tmp = ((y - x) * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+306], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + \left(y - x\right) \cdot \frac{z}{t} \leq 4 \cdot 10^{+306}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{t}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y x) (/.f64 z t))) < 4.00000000000000007e306Initial program 98.1%
clear-num98.1%
un-div-inv98.1%
Applied egg-rr98.1%
if 4.00000000000000007e306 < (+.f64 x (*.f64 (-.f64 y x) (/.f64 z t))) Initial program 84.7%
Taylor expanded in z around inf 97.2%
Taylor expanded in t around inf 100.0%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ (- x) t))))
(if (<= (/ z t) -2e+224)
t_1
(if (<= (/ z t) -5e-70)
(/ y (/ t z))
(if (<= (/ z t) 1e-105)
x
(if (<= (/ z t) 5e+22)
(* y (/ z t))
(if (or (<= (/ z t) 5e+215) (not (<= (/ z t) 1e+272)))
t_1
(* z (/ y t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (-x / t);
double tmp;
if ((z / t) <= -2e+224) {
tmp = t_1;
} else if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 1e-105) {
tmp = x;
} else if ((z / t) <= 5e+22) {
tmp = y * (z / t);
} else if (((z / t) <= 5e+215) || !((z / t) <= 1e+272)) {
tmp = t_1;
} else {
tmp = z * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (-x / t)
if ((z / t) <= (-2d+224)) then
tmp = t_1
else if ((z / t) <= (-5d-70)) then
tmp = y / (t / z)
else if ((z / t) <= 1d-105) then
tmp = x
else if ((z / t) <= 5d+22) then
tmp = y * (z / t)
else if (((z / t) <= 5d+215) .or. (.not. ((z / t) <= 1d+272))) then
tmp = t_1
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (-x / t);
double tmp;
if ((z / t) <= -2e+224) {
tmp = t_1;
} else if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 1e-105) {
tmp = x;
} else if ((z / t) <= 5e+22) {
tmp = y * (z / t);
} else if (((z / t) <= 5e+215) || !((z / t) <= 1e+272)) {
tmp = t_1;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (-x / t) tmp = 0 if (z / t) <= -2e+224: tmp = t_1 elif (z / t) <= -5e-70: tmp = y / (t / z) elif (z / t) <= 1e-105: tmp = x elif (z / t) <= 5e+22: tmp = y * (z / t) elif ((z / t) <= 5e+215) or not ((z / t) <= 1e+272): tmp = t_1 else: tmp = z * (y / t) return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(Float64(-x) / t)) tmp = 0.0 if (Float64(z / t) <= -2e+224) tmp = t_1; elseif (Float64(z / t) <= -5e-70) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 1e-105) tmp = x; elseif (Float64(z / t) <= 5e+22) tmp = Float64(y * Float64(z / t)); elseif ((Float64(z / t) <= 5e+215) || !(Float64(z / t) <= 1e+272)) tmp = t_1; else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (-x / t); tmp = 0.0; if ((z / t) <= -2e+224) tmp = t_1; elseif ((z / t) <= -5e-70) tmp = y / (t / z); elseif ((z / t) <= 1e-105) tmp = x; elseif ((z / t) <= 5e+22) tmp = y * (z / t); elseif (((z / t) <= 5e+215) || ~(((z / t) <= 1e+272))) tmp = t_1; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -2e+224], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 1e-105], x, If[LessEqual[N[(z / t), $MachinePrecision], 5e+22], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(z / t), $MachinePrecision], 5e+215], N[Not[LessEqual[N[(z / t), $MachinePrecision], 1e+272]], $MachinePrecision]], t$95$1, N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-x}{t}\\
\mathbf{if}\;\frac{z}{t} \leq -2 \cdot 10^{+224}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{-105}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{+22}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{+215} \lor \neg \left(\frac{z}{t} \leq 10^{+272}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -1.99999999999999994e224 or 4.9999999999999996e22 < (/.f64 z t) < 5.0000000000000001e215 or 1.0000000000000001e272 < (/.f64 z t) Initial program 92.4%
Taylor expanded in z around inf 96.4%
Taylor expanded in y around 0 69.7%
neg-mul-169.7%
distribute-neg-frac69.7%
Simplified69.7%
if -1.99999999999999994e224 < (/.f64 z t) < -4.9999999999999998e-70Initial program 99.7%
Taylor expanded in z around inf 83.4%
Taylor expanded in y around 0 83.4%
neg-mul-183.4%
+-commutative83.4%
sub-neg83.4%
div-sub83.4%
Simplified83.4%
Taylor expanded in y around inf 51.4%
associate-/l*60.8%
Simplified60.8%
if -4.9999999999999998e-70 < (/.f64 z t) < 9.99999999999999965e-106Initial program 96.7%
Taylor expanded in z around 0 85.5%
if 9.99999999999999965e-106 < (/.f64 z t) < 4.9999999999999996e22Initial program 99.7%
Taylor expanded in z around inf 57.1%
Taylor expanded in y around 0 57.1%
neg-mul-157.1%
+-commutative57.1%
sub-neg57.1%
div-sub57.1%
Simplified57.1%
Taylor expanded in y around inf 43.0%
associate-/l*61.2%
Simplified61.2%
clear-num61.1%
associate-/r/61.2%
clear-num61.2%
Applied egg-rr61.2%
if 5.0000000000000001e215 < (/.f64 z t) < 1.0000000000000001e272Initial program 99.7%
Taylor expanded in z around inf 80.0%
Taylor expanded in y around inf 100.0%
Final simplification73.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ (- x) t))))
(if (<= (/ z t) -2e+224)
t_1
(if (<= (/ z t) -5e-70)
(/ y (/ t z))
(if (<= (/ z t) 1e-105)
x
(if (<= (/ z t) 5e+22)
(* y (/ z t))
(if (<= (/ z t) 5e+215)
t_1
(if (<= (/ z t) 1e+272) (* z (/ y t)) (/ (- z) (/ t x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (-x / t);
double tmp;
if ((z / t) <= -2e+224) {
tmp = t_1;
} else if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 1e-105) {
tmp = x;
} else if ((z / t) <= 5e+22) {
tmp = y * (z / t);
} else if ((z / t) <= 5e+215) {
tmp = t_1;
} else if ((z / t) <= 1e+272) {
tmp = z * (y / t);
} else {
tmp = -z / (t / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (-x / t)
if ((z / t) <= (-2d+224)) then
tmp = t_1
else if ((z / t) <= (-5d-70)) then
tmp = y / (t / z)
else if ((z / t) <= 1d-105) then
tmp = x
else if ((z / t) <= 5d+22) then
tmp = y * (z / t)
else if ((z / t) <= 5d+215) then
tmp = t_1
else if ((z / t) <= 1d+272) then
tmp = z * (y / t)
else
tmp = -z / (t / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (-x / t);
double tmp;
if ((z / t) <= -2e+224) {
tmp = t_1;
} else if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 1e-105) {
tmp = x;
} else if ((z / t) <= 5e+22) {
tmp = y * (z / t);
} else if ((z / t) <= 5e+215) {
tmp = t_1;
} else if ((z / t) <= 1e+272) {
tmp = z * (y / t);
} else {
tmp = -z / (t / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (-x / t) tmp = 0 if (z / t) <= -2e+224: tmp = t_1 elif (z / t) <= -5e-70: tmp = y / (t / z) elif (z / t) <= 1e-105: tmp = x elif (z / t) <= 5e+22: tmp = y * (z / t) elif (z / t) <= 5e+215: tmp = t_1 elif (z / t) <= 1e+272: tmp = z * (y / t) else: tmp = -z / (t / x) return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(Float64(-x) / t)) tmp = 0.0 if (Float64(z / t) <= -2e+224) tmp = t_1; elseif (Float64(z / t) <= -5e-70) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 1e-105) tmp = x; elseif (Float64(z / t) <= 5e+22) tmp = Float64(y * Float64(z / t)); elseif (Float64(z / t) <= 5e+215) tmp = t_1; elseif (Float64(z / t) <= 1e+272) tmp = Float64(z * Float64(y / t)); else tmp = Float64(Float64(-z) / Float64(t / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (-x / t); tmp = 0.0; if ((z / t) <= -2e+224) tmp = t_1; elseif ((z / t) <= -5e-70) tmp = y / (t / z); elseif ((z / t) <= 1e-105) tmp = x; elseif ((z / t) <= 5e+22) tmp = y * (z / t); elseif ((z / t) <= 5e+215) tmp = t_1; elseif ((z / t) <= 1e+272) tmp = z * (y / t); else tmp = -z / (t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -2e+224], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 1e-105], x, If[LessEqual[N[(z / t), $MachinePrecision], 5e+22], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e+215], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], 1e+272], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-x}{t}\\
\mathbf{if}\;\frac{z}{t} \leq -2 \cdot 10^{+224}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{-105}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{+22}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{+215}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{+272}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\end{array}
\end{array}
if (/.f64 z t) < -1.99999999999999994e224 or 4.9999999999999996e22 < (/.f64 z t) < 5.0000000000000001e215Initial program 96.6%
Taylor expanded in z around inf 94.9%
Taylor expanded in y around 0 72.8%
neg-mul-172.8%
distribute-neg-frac72.8%
Simplified72.8%
if -1.99999999999999994e224 < (/.f64 z t) < -4.9999999999999998e-70Initial program 99.7%
Taylor expanded in z around inf 83.4%
Taylor expanded in y around 0 83.4%
neg-mul-183.4%
+-commutative83.4%
sub-neg83.4%
div-sub83.4%
Simplified83.4%
Taylor expanded in y around inf 51.4%
associate-/l*60.8%
Simplified60.8%
if -4.9999999999999998e-70 < (/.f64 z t) < 9.99999999999999965e-106Initial program 96.7%
Taylor expanded in z around 0 85.5%
if 9.99999999999999965e-106 < (/.f64 z t) < 4.9999999999999996e22Initial program 99.7%
Taylor expanded in z around inf 57.1%
Taylor expanded in y around 0 57.1%
neg-mul-157.1%
+-commutative57.1%
sub-neg57.1%
div-sub57.1%
Simplified57.1%
Taylor expanded in y around inf 43.0%
associate-/l*61.2%
Simplified61.2%
clear-num61.1%
associate-/r/61.2%
clear-num61.2%
Applied egg-rr61.2%
if 5.0000000000000001e215 < (/.f64 z t) < 1.0000000000000001e272Initial program 99.7%
Taylor expanded in z around inf 80.0%
Taylor expanded in y around inf 100.0%
if 1.0000000000000001e272 < (/.f64 z t) Initial program 82.5%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around 0 99.9%
neg-mul-199.9%
+-commutative99.9%
sub-neg99.9%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around 0 62.6%
mul-1-neg62.6%
associate-/l*62.6%
distribute-neg-frac62.6%
Simplified62.6%
Final simplification73.2%
(FPCore (x y z t)
:precision binary64
(if (<= (/ z t) -2e+224)
(/ (* x (- z)) t)
(if (<= (/ z t) -5e-70)
(/ y (/ t z))
(if (<= (/ z t) 1e-105)
x
(if (<= (/ z t) 5e+22)
(* y (/ z t))
(if (<= (/ z t) 5e+215)
(* z (/ (- x) t))
(if (<= (/ z t) 1e+272) (* z (/ y t)) (/ (- z) (/ t x)))))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -2e+224) {
tmp = (x * -z) / t;
} else if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 1e-105) {
tmp = x;
} else if ((z / t) <= 5e+22) {
tmp = y * (z / t);
} else if ((z / t) <= 5e+215) {
tmp = z * (-x / t);
} else if ((z / t) <= 1e+272) {
tmp = z * (y / t);
} else {
tmp = -z / (t / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-2d+224)) then
tmp = (x * -z) / t
else if ((z / t) <= (-5d-70)) then
tmp = y / (t / z)
else if ((z / t) <= 1d-105) then
tmp = x
else if ((z / t) <= 5d+22) then
tmp = y * (z / t)
else if ((z / t) <= 5d+215) then
tmp = z * (-x / t)
else if ((z / t) <= 1d+272) then
tmp = z * (y / t)
else
tmp = -z / (t / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -2e+224) {
tmp = (x * -z) / t;
} else if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 1e-105) {
tmp = x;
} else if ((z / t) <= 5e+22) {
tmp = y * (z / t);
} else if ((z / t) <= 5e+215) {
tmp = z * (-x / t);
} else if ((z / t) <= 1e+272) {
tmp = z * (y / t);
} else {
tmp = -z / (t / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -2e+224: tmp = (x * -z) / t elif (z / t) <= -5e-70: tmp = y / (t / z) elif (z / t) <= 1e-105: tmp = x elif (z / t) <= 5e+22: tmp = y * (z / t) elif (z / t) <= 5e+215: tmp = z * (-x / t) elif (z / t) <= 1e+272: tmp = z * (y / t) else: tmp = -z / (t / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -2e+224) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (Float64(z / t) <= -5e-70) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 1e-105) tmp = x; elseif (Float64(z / t) <= 5e+22) tmp = Float64(y * Float64(z / t)); elseif (Float64(z / t) <= 5e+215) tmp = Float64(z * Float64(Float64(-x) / t)); elseif (Float64(z / t) <= 1e+272) tmp = Float64(z * Float64(y / t)); else tmp = Float64(Float64(-z) / Float64(t / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -2e+224) tmp = (x * -z) / t; elseif ((z / t) <= -5e-70) tmp = y / (t / z); elseif ((z / t) <= 1e-105) tmp = x; elseif ((z / t) <= 5e+22) tmp = y * (z / t); elseif ((z / t) <= 5e+215) tmp = z * (-x / t); elseif ((z / t) <= 1e+272) tmp = z * (y / t); else tmp = -z / (t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -2e+224], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 1e-105], x, If[LessEqual[N[(z / t), $MachinePrecision], 5e+22], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e+215], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 1e+272], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -2 \cdot 10^{+224}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{-105}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{+22}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{+215}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{+272}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\end{array}
\end{array}
if (/.f64 z t) < -1.99999999999999994e224Initial program 93.2%
Taylor expanded in z around inf 92.7%
Taylor expanded in y around 0 92.7%
neg-mul-192.7%
+-commutative92.7%
sub-neg92.7%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around 0 71.8%
associate-*r/71.8%
mul-1-neg71.8%
distribute-rgt-neg-out71.8%
Simplified71.8%
if -1.99999999999999994e224 < (/.f64 z t) < -4.9999999999999998e-70Initial program 99.7%
Taylor expanded in z around inf 83.4%
Taylor expanded in y around 0 83.4%
neg-mul-183.4%
+-commutative83.4%
sub-neg83.4%
div-sub83.4%
Simplified83.4%
Taylor expanded in y around inf 51.4%
associate-/l*60.8%
Simplified60.8%
if -4.9999999999999998e-70 < (/.f64 z t) < 9.99999999999999965e-106Initial program 96.7%
Taylor expanded in z around 0 85.5%
if 9.99999999999999965e-106 < (/.f64 z t) < 4.9999999999999996e22Initial program 99.7%
Taylor expanded in z around inf 57.1%
Taylor expanded in y around 0 57.1%
neg-mul-157.1%
+-commutative57.1%
sub-neg57.1%
div-sub57.1%
Simplified57.1%
Taylor expanded in y around inf 43.0%
associate-/l*61.2%
Simplified61.2%
clear-num61.1%
associate-/r/61.2%
clear-num61.2%
Applied egg-rr61.2%
if 4.9999999999999996e22 < (/.f64 z t) < 5.0000000000000001e215Initial program 99.6%
Taylor expanded in z around inf 96.7%
Taylor expanded in y around 0 73.8%
neg-mul-173.8%
distribute-neg-frac73.8%
Simplified73.8%
if 5.0000000000000001e215 < (/.f64 z t) < 1.0000000000000001e272Initial program 99.7%
Taylor expanded in z around inf 80.0%
Taylor expanded in y around inf 100.0%
if 1.0000000000000001e272 < (/.f64 z t) Initial program 82.5%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around 0 99.9%
neg-mul-199.9%
+-commutative99.9%
sub-neg99.9%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around 0 62.6%
mul-1-neg62.6%
associate-/l*62.6%
distribute-neg-frac62.6%
Simplified62.6%
Final simplification73.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ x (* (- y x) (/ z t))))) (if (<= t_1 4e+306) t_1 (/ (* (- y x) z) t))))
double code(double x, double y, double z, double t) {
double t_1 = x + ((y - x) * (z / t));
double tmp;
if (t_1 <= 4e+306) {
tmp = t_1;
} else {
tmp = ((y - x) * z) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - x) * (z / t))
if (t_1 <= 4d+306) then
tmp = t_1
else
tmp = ((y - x) * z) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + ((y - x) * (z / t));
double tmp;
if (t_1 <= 4e+306) {
tmp = t_1;
} else {
tmp = ((y - x) * z) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + ((y - x) * (z / t)) tmp = 0 if t_1 <= 4e+306: tmp = t_1 else: tmp = ((y - x) * z) / t return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(Float64(y - x) * Float64(z / t))) tmp = 0.0 if (t_1 <= 4e+306) tmp = t_1; else tmp = Float64(Float64(Float64(y - x) * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + ((y - x) * (z / t)); tmp = 0.0; if (t_1 <= 4e+306) tmp = t_1; else tmp = ((y - x) * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+306], t$95$1, N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{+306}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{t}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y x) (/.f64 z t))) < 4.00000000000000007e306Initial program 98.1%
if 4.00000000000000007e306 < (+.f64 x (*.f64 (-.f64 y x) (/.f64 z t))) Initial program 84.7%
Taylor expanded in z around inf 97.2%
Taylor expanded in t around inf 100.0%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -5e-70) (not (<= (/ z t) 1e-105))) (* (- y x) (/ z t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-70) || !((z / t) <= 1e-105)) {
tmp = (y - x) * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z / t) <= (-5d-70)) .or. (.not. ((z / t) <= 1d-105))) then
tmp = (y - x) * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-70) || !((z / t) <= 1e-105)) {
tmp = (y - x) * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -5e-70) or not ((z / t) <= 1e-105): tmp = (y - x) * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -5e-70) || !(Float64(z / t) <= 1e-105)) tmp = Float64(Float64(y - x) * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -5e-70) || ~(((z / t) <= 1e-105))) tmp = (y - x) * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[Not[LessEqual[N[(z / t), $MachinePrecision], 1e-105]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-70} \lor \neg \left(\frac{z}{t} \leq 10^{-105}\right):\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e-70 or 9.99999999999999965e-106 < (/.f64 z t) Initial program 95.9%
Taylor expanded in z around inf 85.7%
Taylor expanded in t around inf 82.8%
associate-/l*87.5%
div-inv87.4%
clear-num87.5%
Applied egg-rr87.5%
if -4.9999999999999998e-70 < (/.f64 z t) < 9.99999999999999965e-106Initial program 96.7%
Taylor expanded in z around 0 85.5%
Final simplification86.8%
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -5e-70) (* (- y x) (/ z t)) (if (<= (/ z t) 5e-28) x (* z (/ (- y x) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = (y - x) * (z / t);
} else if ((z / t) <= 5e-28) {
tmp = x;
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-5d-70)) then
tmp = (y - x) * (z / t)
else if ((z / t) <= 5d-28) then
tmp = x
else
tmp = z * ((y - x) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = (y - x) * (z / t);
} else if ((z / t) <= 5e-28) {
tmp = x;
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -5e-70: tmp = (y - x) * (z / t) elif (z / t) <= 5e-28: tmp = x else: tmp = z * ((y - x) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -5e-70) tmp = Float64(Float64(y - x) * Float64(z / t)); elseif (Float64(z / t) <= 5e-28) tmp = x; else tmp = Float64(z * Float64(Float64(y - x) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -5e-70) tmp = (y - x) * (z / t); elseif ((z / t) <= 5e-28) tmp = x; else tmp = z * ((y - x) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e-28], x, N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e-70Initial program 97.4%
Taylor expanded in z around inf 86.8%
Taylor expanded in t around inf 84.5%
associate-/l*91.6%
div-inv91.4%
clear-num91.5%
Applied egg-rr91.5%
if -4.9999999999999998e-70 < (/.f64 z t) < 5.0000000000000002e-28Initial program 97.2%
Taylor expanded in z around 0 80.2%
if 5.0000000000000002e-28 < (/.f64 z t) Initial program 93.6%
Taylor expanded in z around inf 94.7%
Taylor expanded in y around 0 94.7%
neg-mul-194.7%
+-commutative94.7%
sub-neg94.7%
div-sub96.1%
Simplified96.1%
Final simplification88.2%
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -2.0) (* (- y x) (/ z t)) (if (<= (/ z t) 4e-17) (+ x (* y (/ z t))) (* z (/ (- y x) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -2.0) {
tmp = (y - x) * (z / t);
} else if ((z / t) <= 4e-17) {
tmp = x + (y * (z / t));
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-2.0d0)) then
tmp = (y - x) * (z / t)
else if ((z / t) <= 4d-17) then
tmp = x + (y * (z / t))
else
tmp = z * ((y - x) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -2.0) {
tmp = (y - x) * (z / t);
} else if ((z / t) <= 4e-17) {
tmp = x + (y * (z / t));
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -2.0: tmp = (y - x) * (z / t) elif (z / t) <= 4e-17: tmp = x + (y * (z / t)) else: tmp = z * ((y - x) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -2.0) tmp = Float64(Float64(y - x) * Float64(z / t)); elseif (Float64(z / t) <= 4e-17) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(z * Float64(Float64(y - x) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -2.0) tmp = (y - x) * (z / t); elseif ((z / t) <= 4e-17) tmp = x + (y * (z / t)); else tmp = z * ((y - x) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -2.0], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 4e-17], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -2:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 4 \cdot 10^{-17}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -2Initial program 97.0%
Taylor expanded in z around inf 91.8%
Taylor expanded in t around inf 91.9%
associate-/l*95.9%
div-inv95.7%
clear-num95.8%
Applied egg-rr95.8%
if -2 < (/.f64 z t) < 4.00000000000000029e-17Initial program 97.5%
Taylor expanded in y around inf 93.4%
associate-*r/97.5%
Simplified97.5%
if 4.00000000000000029e-17 < (/.f64 z t) Initial program 93.4%
Taylor expanded in z around inf 95.8%
Taylor expanded in y around 0 95.8%
neg-mul-195.8%
+-commutative95.8%
sub-neg95.8%
div-sub97.2%
Simplified97.2%
Final simplification97.0%
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -1e-18) (/ (- y x) (/ t z)) (if (<= (/ z t) 4e-17) (+ x (* y (/ z t))) (* z (/ (- y x) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -1e-18) {
tmp = (y - x) / (t / z);
} else if ((z / t) <= 4e-17) {
tmp = x + (y * (z / t));
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-1d-18)) then
tmp = (y - x) / (t / z)
else if ((z / t) <= 4d-17) then
tmp = x + (y * (z / t))
else
tmp = z * ((y - x) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -1e-18) {
tmp = (y - x) / (t / z);
} else if ((z / t) <= 4e-17) {
tmp = x + (y * (z / t));
} else {
tmp = z * ((y - x) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -1e-18: tmp = (y - x) / (t / z) elif (z / t) <= 4e-17: tmp = x + (y * (z / t)) else: tmp = z * ((y - x) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -1e-18) tmp = Float64(Float64(y - x) / Float64(t / z)); elseif (Float64(z / t) <= 4e-17) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(z * Float64(Float64(y - x) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -1e-18) tmp = (y - x) / (t / z); elseif ((z / t) <= 4e-17) tmp = x + (y * (z / t)); else tmp = z * ((y - x) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -1e-18], N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 4e-17], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 4 \cdot 10^{-17}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -1.0000000000000001e-18Initial program 97.0%
Taylor expanded in z around inf 91.9%
sub-div94.8%
associate-/r/95.9%
Applied egg-rr95.9%
if -1.0000000000000001e-18 < (/.f64 z t) < 4.00000000000000029e-17Initial program 97.5%
Taylor expanded in y around inf 94.2%
associate-*r/97.5%
Simplified97.5%
if 4.00000000000000029e-17 < (/.f64 z t) Initial program 93.4%
Taylor expanded in z around inf 95.8%
Taylor expanded in y around 0 95.8%
neg-mul-195.8%
+-commutative95.8%
sub-neg95.8%
div-sub97.2%
Simplified97.2%
Final simplification97.0%
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -5e-70) (* y (/ z t)) (if (<= (/ z t) 5e-48) x (* z (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = y * (z / t);
} else if ((z / t) <= 5e-48) {
tmp = x;
} else {
tmp = z * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-5d-70)) then
tmp = y * (z / t)
else if ((z / t) <= 5d-48) then
tmp = x
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = y * (z / t);
} else if ((z / t) <= 5e-48) {
tmp = x;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -5e-70: tmp = y * (z / t) elif (z / t) <= 5e-48: tmp = x else: tmp = z * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -5e-70) tmp = Float64(y * Float64(z / t)); elseif (Float64(z / t) <= 5e-48) tmp = x; else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -5e-70) tmp = y * (z / t); elseif ((z / t) <= 5e-48) tmp = x; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e-48], x, N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e-70Initial program 97.4%
Taylor expanded in z around inf 86.8%
Taylor expanded in y around 0 86.8%
neg-mul-186.8%
+-commutative86.8%
sub-neg86.8%
div-sub89.4%
Simplified89.4%
Taylor expanded in y around inf 50.4%
associate-/l*56.4%
Simplified56.4%
clear-num56.4%
associate-/r/56.3%
clear-num56.4%
Applied egg-rr56.4%
if -4.9999999999999998e-70 < (/.f64 z t) < 4.9999999999999999e-48Initial program 97.1%
Taylor expanded in z around 0 80.8%
if 4.9999999999999999e-48 < (/.f64 z t) Initial program 93.8%
Taylor expanded in z around inf 93.5%
Taylor expanded in y around inf 51.2%
Final simplification64.7%
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -5e-70) (/ y (/ t z)) (if (<= (/ z t) 5e-48) x (* z (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 5e-48) {
tmp = x;
} else {
tmp = z * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-5d-70)) then
tmp = y / (t / z)
else if ((z / t) <= 5d-48) then
tmp = x
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 5e-48) {
tmp = x;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -5e-70: tmp = y / (t / z) elif (z / t) <= 5e-48: tmp = x else: tmp = z * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -5e-70) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 5e-48) tmp = x; else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -5e-70) tmp = y / (t / z); elseif ((z / t) <= 5e-48) tmp = x; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e-48], x, N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e-70Initial program 97.4%
Taylor expanded in z around inf 86.8%
Taylor expanded in y around 0 86.8%
neg-mul-186.8%
+-commutative86.8%
sub-neg86.8%
div-sub89.4%
Simplified89.4%
Taylor expanded in y around inf 50.4%
associate-/l*56.4%
Simplified56.4%
if -4.9999999999999998e-70 < (/.f64 z t) < 4.9999999999999999e-48Initial program 97.1%
Taylor expanded in z around 0 80.8%
if 4.9999999999999999e-48 < (/.f64 z t) Initial program 93.8%
Taylor expanded in z around inf 93.5%
Taylor expanded in y around inf 51.2%
Final simplification64.7%
(FPCore (x y z t) :precision binary64 (if (<= (/ z t) -5e-70) (/ y (/ t z)) (if (<= (/ z t) 5e-48) x (/ z (/ t y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 5e-48) {
tmp = x;
} else {
tmp = z / (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z / t) <= (-5d-70)) then
tmp = y / (t / z)
else if ((z / t) <= 5d-48) then
tmp = x
else
tmp = z / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z / t) <= -5e-70) {
tmp = y / (t / z);
} else if ((z / t) <= 5e-48) {
tmp = x;
} else {
tmp = z / (t / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z / t) <= -5e-70: tmp = y / (t / z) elif (z / t) <= 5e-48: tmp = x else: tmp = z / (t / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z / t) <= -5e-70) tmp = Float64(y / Float64(t / z)); elseif (Float64(z / t) <= 5e-48) tmp = x; else tmp = Float64(z / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z / t) <= -5e-70) tmp = y / (t / z); elseif ((z / t) <= 5e-48) tmp = x; else tmp = z / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z / t), $MachinePrecision], -5e-70], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], 5e-48], x, N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-70}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;\frac{z}{t} \leq 5 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e-70Initial program 97.4%
Taylor expanded in z around inf 86.8%
Taylor expanded in y around 0 86.8%
neg-mul-186.8%
+-commutative86.8%
sub-neg86.8%
div-sub89.4%
Simplified89.4%
Taylor expanded in y around inf 50.4%
associate-/l*56.4%
Simplified56.4%
if -4.9999999999999998e-70 < (/.f64 z t) < 4.9999999999999999e-48Initial program 97.1%
Taylor expanded in z around 0 80.8%
if 4.9999999999999999e-48 < (/.f64 z t) Initial program 93.8%
Taylor expanded in z around inf 93.5%
Taylor expanded in y around inf 51.2%
*-commutative51.2%
clear-num51.2%
un-div-inv51.2%
Applied egg-rr51.2%
Final simplification64.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.5e-107) (not (<= z 1.1e-57))) (* z (/ y t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.5e-107) || !(z <= 1.1e-57)) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.5d-107)) .or. (.not. (z <= 1.1d-57))) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.5e-107) || !(z <= 1.1e-57)) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.5e-107) or not (z <= 1.1e-57): tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.5e-107) || !(z <= 1.1e-57)) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.5e-107) || ~((z <= 1.1e-57))) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.5e-107], N[Not[LessEqual[z, 1.1e-57]], $MachinePrecision]], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-107} \lor \neg \left(z \leq 1.1 \cdot 10^{-57}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.4999999999999999e-107 or 1.09999999999999999e-57 < z Initial program 95.7%
Taylor expanded in z around inf 83.8%
Taylor expanded in y around inf 51.5%
if -1.4999999999999999e-107 < z < 1.09999999999999999e-57Initial program 97.0%
Taylor expanded in z around 0 69.9%
Final simplification58.7%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.2%
Taylor expanded in z around 0 36.5%
Final simplification36.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ z t))) (t_2 (+ x (/ (- y x) (/ t z)))))
(if (< t_1 -1013646692435.8867)
t_2
(if (< t_1 0.0) (+ x (/ (* (- y x) z) t)) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (z / t);
double t_2 = x + ((y - x) / (t / z));
double tmp;
if (t_1 < -1013646692435.8867) {
tmp = t_2;
} else if (t_1 < 0.0) {
tmp = x + (((y - x) * z) / t);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y - x) * (z / t)
t_2 = x + ((y - x) / (t / z))
if (t_1 < (-1013646692435.8867d0)) then
tmp = t_2
else if (t_1 < 0.0d0) then
tmp = x + (((y - x) * z) / t)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (z / t);
double t_2 = x + ((y - x) / (t / z));
double tmp;
if (t_1 < -1013646692435.8867) {
tmp = t_2;
} else if (t_1 < 0.0) {
tmp = x + (((y - x) * z) / t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (z / t) t_2 = x + ((y - x) / (t / z)) tmp = 0 if t_1 < -1013646692435.8867: tmp = t_2 elif t_1 < 0.0: tmp = x + (((y - x) * z) / t) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(z / t)) t_2 = Float64(x + Float64(Float64(y - x) / Float64(t / z))) tmp = 0.0 if (t_1 < -1013646692435.8867) tmp = t_2; elseif (t_1 < 0.0) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (z / t); t_2 = x + ((y - x) / (t / z)); tmp = 0.0; if (t_1 < -1013646692435.8867) tmp = t_2; elseif (t_1 < 0.0) tmp = x + (((y - x) * z) / t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$1, -1013646692435.8867], t$95$2, If[Less[t$95$1, 0.0], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{t}\\
t_2 := x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{if}\;t_1 < -1013646692435.8867:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 < 0:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023279
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) 0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))