
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- z y) (/ (- z a) (- x t))))))
(if (<= a -2.5e-86)
t_1
(if (<= a 4.2e-112) (fma (/ (- y a) z) (- x t) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double tmp;
if (a <= -2.5e-86) {
tmp = t_1;
} else if (a <= 4.2e-112) {
tmp = fma(((y - a) / z), (x - t), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))) tmp = 0.0 if (a <= -2.5e-86) tmp = t_1; elseif (a <= 4.2e-112) tmp = fma(Float64(Float64(y - a) / z), Float64(x - t), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-86], t$95$1, If[LessEqual[a, 4.2e-112], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z - y}{\frac{z - a}{x - t}}\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-112}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.4999999999999999e-86 or 4.2000000000000001e-112 < a Initial program 67.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6488.4
Applied rewrites88.4%
if -2.4999999999999999e-86 < a < 4.2000000000000001e-112Initial program 62.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6470.4
Applied rewrites70.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6486.4
Applied rewrites86.4%
Taylor expanded in x around 0
Applied rewrites90.6%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.6e+40)
(- t (* (- a y) (/ (- x t) z)))
(if (<= z 3.7e-152)
(fma (/ (- y z) a) (- t x) x)
(if (<= z 5.8e+52)
(- x (/ (* t (- y z)) (- z a)))
(fma (/ (- y a) z) (- x t) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+40) {
tmp = t - ((a - y) * ((x - t) / z));
} else if (z <= 3.7e-152) {
tmp = fma(((y - z) / a), (t - x), x);
} else if (z <= 5.8e+52) {
tmp = x - ((t * (y - z)) / (z - a));
} else {
tmp = fma(((y - a) / z), (x - t), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+40) tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); elseif (z <= 3.7e-152) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); elseif (z <= 5.8e+52) tmp = Float64(x - Float64(Float64(t * Float64(y - z)) / Float64(z - a))); else tmp = fma(Float64(Float64(y - a) / z), Float64(x - t), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+40], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-152], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 5.8e+52], N[(x - N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+40}:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-152}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+52}:\\
\;\;\;\;x - \frac{t \cdot \left(y - z\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\end{array}
\end{array}
if z < -1.5999999999999999e40Initial program 33.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6468.0
Applied rewrites68.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.3
Applied rewrites85.3%
if -1.5999999999999999e40 < z < 3.6999999999999998e-152Initial program 85.2%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6479.7
Applied rewrites79.7%
if 3.6999999999999998e-152 < z < 5.8e52Initial program 92.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6480.8
Applied rewrites80.8%
if 5.8e52 < z Initial program 45.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6470.2
Applied rewrites70.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6473.3
Applied rewrites73.3%
Taylor expanded in x around 0
Applied rewrites76.3%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ z a) x x)) (t_2 (* -1.0 (- t))))
(if (<= z -4e+70)
t_2
(if (<= z 1.25e-257)
t_1
(if (<= z 1.05e-135) (* (/ y a) t) (if (<= z 2.8e+91) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / a), x, x);
double t_2 = -1.0 * -t;
double tmp;
if (z <= -4e+70) {
tmp = t_2;
} else if (z <= 1.25e-257) {
tmp = t_1;
} else if (z <= 1.05e-135) {
tmp = (y / a) * t;
} else if (z <= 2.8e+91) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / a), x, x) t_2 = Float64(-1.0 * Float64(-t)) tmp = 0.0 if (z <= -4e+70) tmp = t_2; elseif (z <= 1.25e-257) tmp = t_1; elseif (z <= 1.05e-135) tmp = Float64(Float64(y / a) * t); elseif (z <= 2.8e+91) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * x + x), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 * (-t)), $MachinePrecision]}, If[LessEqual[z, -4e+70], t$95$2, If[LessEqual[z, 1.25e-257], t$95$1, If[LessEqual[z, 1.05e-135], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.8e+91], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{a}, x, x\right)\\
t_2 := -1 \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-135}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.00000000000000029e70 or 2.7999999999999999e91 < z Initial program 34.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.1
Applied rewrites60.1%
Taylor expanded in a around 0
Applied rewrites60.3%
Taylor expanded in z around inf
Applied rewrites55.8%
if -4.00000000000000029e70 < z < 1.24999999999999997e-257 or 1.05e-135 < z < 2.7999999999999999e91Initial program 86.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6469.8
Applied rewrites69.8%
Taylor expanded in y around 0
Applied rewrites43.9%
Taylor expanded in t around 0
Applied rewrites38.8%
if 1.24999999999999997e-257 < z < 1.05e-135Initial program 88.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.5
Applied rewrites60.5%
Taylor expanded in z around 0
Applied rewrites53.3%
Final simplification47.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -1.15e+194)
t_1
(if (<= a -5.1e-20)
(* (- z y) (/ t (- z a)))
(if (<= a 13200.0) (fma (/ y z) (- x t) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -1.15e+194) {
tmp = t_1;
} else if (a <= -5.1e-20) {
tmp = (z - y) * (t / (z - a));
} else if (a <= 13200.0) {
tmp = fma((y / z), (x - t), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.15e+194) tmp = t_1; elseif (a <= -5.1e-20) tmp = Float64(Float64(z - y) * Float64(t / Float64(z - a))); elseif (a <= 13200.0) tmp = fma(Float64(y / z), Float64(x - t), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.15e+194], t$95$1, If[LessEqual[a, -5.1e-20], N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 13200.0], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{t}{z - a}\\
\mathbf{elif}\;a \leq 13200:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x - t, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.15000000000000003e194 or 13200 < a Initial program 68.3%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.8
Applied rewrites81.8%
if -1.15000000000000003e194 < a < -5.10000000000000019e-20Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.5
Applied rewrites64.5%
if -5.10000000000000019e-20 < a < 13200Initial program 62.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6472.2
Applied rewrites72.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.1
Applied rewrites80.1%
Taylor expanded in x around 0
Applied rewrites82.4%
Taylor expanded in a around 0
Applied rewrites79.2%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.2e+18)
(- t (* (- a y) (/ (- x t) z)))
(if (<= z 5.5e+76)
(- x (/ (* (- z y) (- x t)) (- z a)))
(fma (/ (- y a) z) (- x t) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+18) {
tmp = t - ((a - y) * ((x - t) / z));
} else if (z <= 5.5e+76) {
tmp = x - (((z - y) * (x - t)) / (z - a));
} else {
tmp = fma(((y - a) / z), (x - t), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e+18) tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); elseif (z <= 5.5e+76) tmp = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))); else tmp = fma(Float64(Float64(y - a) / z), Float64(x - t), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+18], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+76], N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+18}:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+76}:\\
\;\;\;\;x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\end{array}
\end{array}
if z < -4.2e18Initial program 33.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6469.3
Applied rewrites69.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.0
Applied rewrites81.0%
if -4.2e18 < z < 5.5000000000000001e76Initial program 90.2%
if 5.5000000000000001e76 < z Initial program 40.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6467.5
Applied rewrites67.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.6
Applied rewrites76.6%
Taylor expanded in x around 0
Applied rewrites79.9%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- t x) a) y x)))
(if (<= a -1.15e+194)
t_1
(if (<= a -5.1e-20)
(* (- z y) (/ t (- z a)))
(if (<= a 27000.0) (fma (/ y z) (- x t) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -1.15e+194) {
tmp = t_1;
} else if (a <= -5.1e-20) {
tmp = (z - y) * (t / (z - a));
} else if (a <= 27000.0) {
tmp = fma((y / z), (x - t), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -1.15e+194) tmp = t_1; elseif (a <= -5.1e-20) tmp = Float64(Float64(z - y) * Float64(t / Float64(z - a))); elseif (a <= 27000.0) tmp = fma(Float64(y / z), Float64(x - t), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -1.15e+194], t$95$1, If[LessEqual[a, -5.1e-20], N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 27000.0], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.1 \cdot 10^{-20}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{t}{z - a}\\
\mathbf{elif}\;a \leq 27000:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x - t, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.15000000000000003e194 or 27000 < a Initial program 68.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.1
Applied rewrites75.1%
if -1.15000000000000003e194 < a < -5.10000000000000019e-20Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.5
Applied rewrites64.5%
if -5.10000000000000019e-20 < a < 27000Initial program 62.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6472.2
Applied rewrites72.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.1
Applied rewrites80.1%
Taylor expanded in x around 0
Applied rewrites82.4%
Taylor expanded in a around 0
Applied rewrites79.2%
Final simplification75.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -1.3e+92)
t_1
(if (<= a 1450000000000.0) (fma (/ (- y a) z) (- x t) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -1.3e+92) {
tmp = t_1;
} else if (a <= 1450000000000.0) {
tmp = fma(((y - a) / z), (x - t), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.3e+92) tmp = t_1; elseif (a <= 1450000000000.0) tmp = fma(Float64(Float64(y - a) / z), Float64(x - t), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.3e+92], t$95$1, If[LessEqual[a, 1450000000000.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1450000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - a}{z}, x - t, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.2999999999999999e92 or 1.45e12 < a Initial program 69.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.0
Applied rewrites80.0%
if -1.2999999999999999e92 < a < 1.45e12Initial program 62.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6475.1
Applied rewrites75.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6475.3
Applied rewrites75.3%
Taylor expanded in x around 0
Applied rewrites77.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x t) z) y t))) (if (<= z -6.6e+25) t_1 (if (<= z 4.1e-35) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), y, t);
double tmp;
if (z <= -6.6e+25) {
tmp = t_1;
} else if (z <= 4.1e-35) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), y, t) tmp = 0.0 if (z <= -6.6e+25) tmp = t_1; elseif (z <= 4.1e-35) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -6.6e+25], t$95$1, If[LessEqual[z, 4.1e-35], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.6000000000000002e25 or 4.10000000000000026e-35 < z Initial program 47.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6473.5
Applied rewrites73.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.1
Applied rewrites76.1%
Taylor expanded in x around 0
Applied rewrites76.2%
Taylor expanded in a around 0
Applied rewrites71.9%
if -6.6000000000000002e25 < z < 4.10000000000000026e-35Initial program 87.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.7
Applied rewrites76.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -1.2e+30) t_1 (if (<= z 2.8e+91) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -1.2e+30) {
tmp = t_1;
} else if (z <= 2.8e+91) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -1.2e+30) tmp = t_1; elseif (z <= 2.8e+91) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.2e+30], t$95$1, If[LessEqual[z, 2.8e+91], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2e30 or 2.7999999999999999e91 < z Initial program 35.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.0
Applied rewrites60.0%
Taylor expanded in a around 0
Applied rewrites59.4%
Taylor expanded in z around inf
Applied rewrites59.4%
if -1.2e30 < z < 2.7999999999999999e91Initial program 88.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.3
Applied rewrites71.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -1.2e+30) t_1 (if (<= z 2.8e+91) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -1.2e+30) {
tmp = t_1;
} else if (z <= 2.8e+91) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -1.2e+30) tmp = t_1; elseif (z <= 2.8e+91) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.2e+30], t$95$1, If[LessEqual[z, 2.8e+91], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2e30 or 2.7999999999999999e91 < z Initial program 35.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.0
Applied rewrites60.0%
Taylor expanded in a around 0
Applied rewrites59.4%
Taylor expanded in z around inf
Applied rewrites59.4%
if -1.2e30 < z < 2.7999999999999999e91Initial program 88.5%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.9
Applied rewrites74.9%
Taylor expanded in z around 0
Applied rewrites70.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -2.5e+29) t_1 (if (<= z 2.8e+91) (fma (/ y a) (- x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -2.5e+29) {
tmp = t_1;
} else if (z <= 2.8e+91) {
tmp = fma((y / a), -x, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -2.5e+29) tmp = t_1; elseif (z <= 2.8e+91) tmp = fma(Float64(y / a), Float64(-x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.5e+29], t$95$1, If[LessEqual[z, 2.8e+91], N[(N[(y / a), $MachinePrecision] * (-x) + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, -x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.5e29 or 2.7999999999999999e91 < z Initial program 35.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.0
Applied rewrites60.0%
Taylor expanded in a around 0
Applied rewrites59.4%
Taylor expanded in z around inf
Applied rewrites59.4%
if -2.5e29 < z < 2.7999999999999999e91Initial program 88.5%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.9
Applied rewrites74.9%
Taylor expanded in z around 0
Applied rewrites70.5%
Taylor expanded in t around 0
Applied rewrites51.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- x (/ (* t z) a)))) (if (<= a -4.1e+157) t_1 (if (<= a 1.16e+69) (fma (- t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((t * z) / a);
double tmp;
if (a <= -4.1e+157) {
tmp = t_1;
} else if (a <= 1.16e+69) {
tmp = fma(-t, (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(t * z) / a)) tmp = 0.0 if (a <= -4.1e+157) tmp = t_1; elseif (a <= 1.16e+69) tmp = fma(Float64(-t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.1e+157], t$95$1, If[LessEqual[a, 1.16e+69], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t \cdot z}{a}\\
\mathbf{if}\;a \leq -4.1 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.10000000000000016e157 or 1.16000000000000005e69 < a Initial program 65.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.7
Applied rewrites82.7%
Taylor expanded in y around 0
Applied rewrites50.2%
Taylor expanded in t around inf
Applied rewrites54.8%
if -4.10000000000000016e157 < a < 1.16000000000000005e69Initial program 65.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6457.6
Applied rewrites57.6%
Taylor expanded in a around 0
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites51.7%
Final simplification52.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ z a) x x))) (if (<= a -2.35e+191) t_1 (if (<= a 1.25e+70) (fma (- t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / a), x, x);
double tmp;
if (a <= -2.35e+191) {
tmp = t_1;
} else if (a <= 1.25e+70) {
tmp = fma(-t, (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / a), x, x) tmp = 0.0 if (a <= -2.35e+191) tmp = t_1; elseif (a <= 1.25e+70) tmp = fma(Float64(-t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * x + x), $MachinePrecision]}, If[LessEqual[a, -2.35e+191], t$95$1, If[LessEqual[a, 1.25e+70], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{a}, x, x\right)\\
\mathbf{if}\;a \leq -2.35 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.35000000000000005e191 or 1.2500000000000001e70 < a Initial program 64.8%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in y around 0
Applied rewrites50.4%
Taylor expanded in t around 0
Applied rewrites52.7%
if -2.35000000000000005e191 < a < 1.2500000000000001e70Initial program 66.1%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.3
Applied rewrites58.3%
Taylor expanded in a around 0
Applied rewrites50.9%
Taylor expanded in z around inf
Applied rewrites51.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -1.0 (- t)))) (if (<= z -4.1e-22) t_1 (if (<= z 1.75e-34) (* (/ t a) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -4.1e-22) {
tmp = t_1;
} else if (z <= 1.75e-34) {
tmp = (t / a) * y;
} else {
tmp = t_1;
}
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 = (-1.0d0) * -t
if (z <= (-4.1d-22)) then
tmp = t_1
else if (z <= 1.75d-34) then
tmp = (t / a) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -4.1e-22) {
tmp = t_1;
} else if (z <= 1.75e-34) {
tmp = (t / a) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -t tmp = 0 if z <= -4.1e-22: tmp = t_1 elif z <= 1.75e-34: tmp = (t / a) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 * Float64(-t)) tmp = 0.0 if (z <= -4.1e-22) tmp = t_1; elseif (z <= 1.75e-34) tmp = Float64(Float64(t / a) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 * -t; tmp = 0.0; if (z <= -4.1e-22) tmp = t_1; elseif (z <= 1.75e-34) tmp = (t / a) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * (-t)), $MachinePrecision]}, If[LessEqual[z, -4.1e-22], t$95$1, If[LessEqual[z, 1.75e-34], N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;\frac{t}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.0999999999999999e-22 or 1.75e-34 < z Initial program 47.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.0
Applied rewrites58.0%
Taylor expanded in a around 0
Applied rewrites53.8%
Taylor expanded in z around inf
Applied rewrites46.6%
if -4.0999999999999999e-22 < z < 1.75e-34Initial program 89.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.2
Applied rewrites42.2%
Taylor expanded in z around 0
Applied rewrites31.6%
Applied rewrites32.4%
Final simplification40.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -1.0 (- t)))) (if (<= z -7.2e-12) t_1 (if (<= z 9e-34) (* (/ y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -7.2e-12) {
tmp = t_1;
} else if (z <= 9e-34) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
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 = (-1.0d0) * -t
if (z <= (-7.2d-12)) then
tmp = t_1
else if (z <= 9d-34) then
tmp = (y / a) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -7.2e-12) {
tmp = t_1;
} else if (z <= 9e-34) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -t tmp = 0 if z <= -7.2e-12: tmp = t_1 elif z <= 9e-34: tmp = (y / a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 * Float64(-t)) tmp = 0.0 if (z <= -7.2e-12) tmp = t_1; elseif (z <= 9e-34) tmp = Float64(Float64(y / a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 * -t; tmp = 0.0; if (z <= -7.2e-12) tmp = t_1; elseif (z <= 9e-34) tmp = (y / a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * (-t)), $MachinePrecision]}, If[LessEqual[z, -7.2e-12], t$95$1, If[LessEqual[z, 9e-34], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-34}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2e-12 or 9.00000000000000085e-34 < z Initial program 47.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.0
Applied rewrites58.0%
Taylor expanded in a around 0
Applied rewrites53.8%
Taylor expanded in z around inf
Applied rewrites46.6%
if -7.2e-12 < z < 9.00000000000000085e-34Initial program 89.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.2
Applied rewrites42.2%
Taylor expanded in z around 0
Applied rewrites31.6%
Final simplification40.0%
(FPCore (x y z t a) :precision binary64 (* -1.0 (- t)))
double code(double x, double y, double z, double t, double a) {
return -1.0 * -t;
}
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 = (-1.0d0) * -t
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 * -t;
}
def code(x, y, z, t, a): return -1.0 * -t
function code(x, y, z, t, a) return Float64(-1.0 * Float64(-t)) end
function tmp = code(x, y, z, t, a) tmp = -1.0 * -t; end
code[x_, y_, z_, t_, a_] := N[(-1.0 * (-t)), $MachinePrecision]
\begin{array}{l}
\\
-1 \cdot \left(-t\right)
\end{array}
Initial program 65.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.0
Applied rewrites51.0%
Taylor expanded in a around 0
Applied rewrites38.3%
Taylor expanded in z around inf
Applied rewrites28.6%
Final simplification28.6%
(FPCore (x y z t a) :precision binary64 (+ (- t x) x))
double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
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 = (t - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
def code(x, y, z, t, a): return (t - x) + x
function code(x, y, z, t, a) return Float64(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 65.7%
Taylor expanded in z around inf
lower--.f6421.9
Applied rewrites21.9%
Final simplification21.9%
(FPCore (x y z t a) :precision binary64 (+ (- x) x))
double code(double x, double y, double z, double t, double a) {
return -x + x;
}
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 = -x + x
end function
public static double code(double x, double y, double z, double t, double a) {
return -x + x;
}
def code(x, y, z, t, a): return -x + x
function code(x, y, z, t, a) return Float64(Float64(-x) + x) end
function tmp = code(x, y, z, t, a) tmp = -x + x; end
code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
\begin{array}{l}
\\
\left(-x\right) + x
\end{array}
Initial program 65.7%
Taylor expanded in z around inf
lower--.f6421.9
Applied rewrites21.9%
Taylor expanded in t around 0
Applied rewrites2.7%
Final simplification2.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024244
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))