
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
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 * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
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 * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* 2.0 (* z (exp (* t t)))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * (z * exp((t * 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 * 0.5d0) - y) * sqrt((2.0d0 * (z * exp((t * t)))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((2.0 * (z * Math.exp((t * t)))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((2.0 * (z * math.exp((t * t)))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * Float64(z * exp(Float64(t * t)))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((2.0 * (z * exp((t * t))))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z * N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot e^{t \cdot t}\right)}
\end{array}
Initial program 99.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6499.8
Applied rewrites99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (exp (/ (* t t) 2.0)) 2.0)
(* t_1 (sqrt (* 2.0 z)))
(* t_1 (sqrt (* 2.0 (* z (* t t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (exp(((t * t) / 2.0)) <= 2.0) {
tmp = t_1 * sqrt((2.0 * z));
} else {
tmp = t_1 * sqrt((2.0 * (z * (t * 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 * 0.5d0) - y
if (exp(((t * t) / 2.0d0)) <= 2.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else
tmp = t_1 * sqrt((2.0d0 * (z * (t * t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (Math.exp(((t * t) / 2.0)) <= 2.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else {
tmp = t_1 * Math.sqrt((2.0 * (z * (t * t))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if math.exp(((t * t) / 2.0)) <= 2.0: tmp = t_1 * math.sqrt((2.0 * z)) else: tmp = t_1 * math.sqrt((2.0 * (z * (t * t)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (exp(Float64(Float64(t * t) / 2.0)) <= 2.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); else tmp = Float64(t_1 * sqrt(Float64(2.0 * Float64(z * Float64(t * t))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (exp(((t * t) / 2.0)) <= 2.0) tmp = t_1 * sqrt((2.0 * z)); else tmp = t_1 * sqrt((2.0 * (z * (t * t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 2:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \left(z \cdot \left(t \cdot t\right)\right)}\\
\end{array}
\end{array}
if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 2Initial program 99.5%
Taylor expanded in t around 0
Applied rewrites98.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
*-rgt-identity98.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.0
Applied rewrites98.0%
if 2 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) Initial program 98.5%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6474.0
Applied rewrites74.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6474.0
Applied rewrites74.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (* t t) 0.0005)
(*
(* t_1 (sqrt (* 2.0 z)))
(fma
(* t t)
(fma (* t t) (fma (* t t) 0.020833333333333332 0.125) 0.5)
1.0))
(if (<= (* t t) 1e+94)
(* (sqrt (* 2.0 (* z (exp (* t t))))) (* x 0.5))
(*
t_1
(sqrt
(*
2.0
(*
z
(fma
(* t t)
(fma (* t t) (fma (* t t) 0.16666666666666666 0.5) 1.0)
1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 0.0005) {
tmp = (t_1 * sqrt((2.0 * z))) * fma((t * t), fma((t * t), fma((t * t), 0.020833333333333332, 0.125), 0.5), 1.0);
} else if ((t * t) <= 1e+94) {
tmp = sqrt((2.0 * (z * exp((t * t))))) * (x * 0.5);
} else {
tmp = t_1 * sqrt((2.0 * (z * fma((t * t), fma((t * t), fma((t * t), 0.16666666666666666, 0.5), 1.0), 1.0))));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 0.0005) tmp = Float64(Float64(t_1 * sqrt(Float64(2.0 * z))) * fma(Float64(t * t), fma(Float64(t * t), fma(Float64(t * t), 0.020833333333333332, 0.125), 0.5), 1.0)); elseif (Float64(t * t) <= 1e+94) tmp = Float64(sqrt(Float64(2.0 * Float64(z * exp(Float64(t * t))))) * Float64(x * 0.5)); else tmp = Float64(t_1 * sqrt(Float64(2.0 * Float64(z * fma(Float64(t * t), fma(Float64(t * t), fma(Float64(t * t), 0.16666666666666666, 0.5), 1.0), 1.0))))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 0.0005], N[(N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.020833333333333332 + 0.125), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+94], N[(N[Sqrt[N[(2.0 * N[(z * N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 0.0005:\\
\;\;\;\;\left(t\_1 \cdot \sqrt{2 \cdot z}\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.020833333333333332, 0.125\right), 0.5\right), 1\right)\\
\mathbf{elif}\;t \cdot t \leq 10^{+94}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot e^{t \cdot t}\right)} \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}\\
\end{array}
\end{array}
if (*.f64 t t) < 5.0000000000000001e-4Initial program 99.5%
Taylor expanded in t around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6499.5
Applied rewrites99.5%
if 5.0000000000000001e-4 < (*.f64 t t) < 1e94Initial program 100.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in x around inf
lower-*.f6481.3
Applied rewrites81.3%
if 1e94 < (*.f64 t t) Initial program 98.3%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(*
(- (* x 0.5) y)
(sqrt
(*
2.0
(*
z
(fma
(* t t)
(fma (* t t) (fma (* t t) 0.16666666666666666 0.5) 1.0)
1.0))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * (z * fma((t * t), fma((t * t), fma((t * t), 0.16666666666666666, 0.5), 1.0), 1.0))));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * Float64(z * fma(Float64(t * t), fma(Float64(t * t), fma(Float64(t * t), 0.16666666666666666, 0.5), 1.0), 1.0))))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.16666666666666666 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.16666666666666666, 0.5\right), 1\right), 1\right)\right)}
\end{array}
Initial program 99.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6499.8
Applied rewrites99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6495.3
Applied rewrites95.3%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (fma (* t t) (fma (* t t) (fma (* t t) 0.020833333333333332 0.125) 0.5) 1.0)))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((2.0 * z))) * fma((t * t), fma((t * t), fma((t * t), 0.020833333333333332, 0.125), 0.5), 1.0);
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))) * fma(Float64(t * t), fma(Float64(t * t), fma(Float64(t * t), 0.020833333333333332, 0.125), 0.5), 1.0)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.020833333333333332 + 0.125), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.020833333333333332, 0.125\right), 0.5\right), 1\right)
\end{array}
Initial program 99.0%
Taylor expanded in t around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6495.3
Applied rewrites95.3%
Final simplification95.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (* 2.0 z) 5e+84)
(* (sqrt z) (* t_1 (* (fma 0.5 (* t t) 1.0) (sqrt 2.0))))
(* t_1 (sqrt (* 2.0 (fma z (* t t) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if ((2.0 * z) <= 5e+84) {
tmp = sqrt(z) * (t_1 * (fma(0.5, (t * t), 1.0) * sqrt(2.0)));
} else {
tmp = t_1 * sqrt((2.0 * fma(z, (t * t), z)));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(2.0 * z) <= 5e+84) tmp = Float64(sqrt(z) * Float64(t_1 * Float64(fma(0.5, Float64(t * t), 1.0) * sqrt(2.0)))); else tmp = Float64(t_1 * sqrt(Float64(2.0 * fma(z, Float64(t * t), z)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(2.0 * z), $MachinePrecision], 5e+84], N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$1 * N[(N[(0.5 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;2 \cdot z \leq 5 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{z} \cdot \left(t\_1 \cdot \left(\mathsf{fma}\left(0.5, t \cdot t, 1\right) \cdot \sqrt{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \mathsf{fma}\left(z, t \cdot t, z\right)}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 2 binary64)) < 5.0000000000000001e84Initial program 98.6%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-sqrt.f64N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites86.2%
lift-*.f64N/A
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6486.2
Applied rewrites86.2%
if 5.0000000000000001e84 < (*.f64 z #s(literal 2 binary64)) Initial program 99.8%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6499.8
Applied rewrites99.8%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6499.7
Applied rewrites99.7%
Final simplification90.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (* t t) 2e+55)
(* t_1 (sqrt (* 2.0 (fma z (* t t) z))))
(* (sqrt z) (* t_1 (* 0.5 (* t (* t (sqrt 2.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 2e+55) {
tmp = t_1 * sqrt((2.0 * fma(z, (t * t), z)));
} else {
tmp = sqrt(z) * (t_1 * (0.5 * (t * (t * sqrt(2.0)))));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 2e+55) tmp = Float64(t_1 * sqrt(Float64(2.0 * fma(z, Float64(t * t), z)))); else tmp = Float64(sqrt(z) * Float64(t_1 * Float64(0.5 * Float64(t * Float64(t * sqrt(2.0)))))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 2e+55], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$1 * N[(0.5 * N[(t * N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 2 \cdot 10^{+55}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \mathsf{fma}\left(z, t \cdot t, z\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{z} \cdot \left(t\_1 \cdot \left(0.5 \cdot \left(t \cdot \left(t \cdot \sqrt{2}\right)\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 2.00000000000000002e55Initial program 99.5%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6499.6
Applied rewrites99.6%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6493.5
Applied rewrites93.5%
if 2.00000000000000002e55 < (*.f64 t t) Initial program 98.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-sqrt.f64N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites84.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f6484.2
Applied rewrites84.2%
lift-*.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6484.2
Applied rewrites84.2%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (fma (* t t) (fma t (* t 0.125) 0.5) 1.0)))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((2.0 * z))) * fma((t * t), fma(t, (t * 0.125), 0.5), 1.0);
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))) * fma(Float64(t * t), fma(t, Float64(t * 0.125), 0.5), 1.0)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(t * N[(t * 0.125), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t, t \cdot 0.125, 0.5\right), 1\right)
\end{array}
Initial program 99.0%
Taylor expanded in t around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6492.7
Applied rewrites92.7%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (<= (* t t) 2e+55) (* (- (* x 0.5) y) (sqrt (* 2.0 (fma z (* t t) z)))) (* (* (* t t) (fma x 0.25 (* y -0.5))) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t * t) <= 2e+55) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * fma(z, (t * t), z)));
} else {
tmp = ((t * t) * fma(x, 0.25, (y * -0.5))) * sqrt((2.0 * z));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(t * t) <= 2e+55) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * fma(z, Float64(t * t), z)))); else tmp = Float64(Float64(Float64(t * t) * fma(x, 0.25, Float64(y * -0.5))) * sqrt(Float64(2.0 * z))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(t * t), $MachinePrecision], 2e+55], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * t), $MachinePrecision] * N[(x * 0.25 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \cdot t \leq 2 \cdot 10^{+55}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(z, t \cdot t, z\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t \cdot t\right) \cdot \mathsf{fma}\left(x, 0.25, y \cdot -0.5\right)\right) \cdot \sqrt{2 \cdot z}\\
\end{array}
\end{array}
if (*.f64 t t) < 2.00000000000000002e55Initial program 99.5%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6499.6
Applied rewrites99.6%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6493.5
Applied rewrites93.5%
if 2.00000000000000002e55 < (*.f64 t t) Initial program 98.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-sqrt.f64N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites84.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f6484.2
Applied rewrites84.2%
Applied rewrites84.2%
Final simplification89.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (fma z (* t t) z)))))
(if (<= t 8.2e+19)
(* (- (* x 0.5) y) (sqrt (* 2.0 z)))
(if (<= t 4.2e+286) (* (* x 0.5) t_1) (* t_1 (- y))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * fma(z, (t * t), z)));
double tmp;
if (t <= 8.2e+19) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else if (t <= 4.2e+286) {
tmp = (x * 0.5) * t_1;
} else {
tmp = t_1 * -y;
}
return tmp;
}
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * fma(z, Float64(t * t), z))) tmp = 0.0 if (t <= 8.2e+19) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); elseif (t <= 4.2e+286) tmp = Float64(Float64(x * 0.5) * t_1); else tmp = Float64(t_1 * Float64(-y)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 8.2e+19], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+286], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * (-y)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \mathsf{fma}\left(z, t \cdot t, z\right)}\\
\mathbf{if}\;t \leq 8.2 \cdot 10^{+19}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+286}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < 8.2e19Initial program 99.7%
Taylor expanded in t around 0
Applied rewrites68.1%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
*-rgt-identity68.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
if 8.2e19 < t < 4.2000000000000002e286Initial program 96.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6475.3
Applied rewrites75.3%
Taylor expanded in x around inf
lower-*.f6463.1
Applied rewrites63.1%
if 4.2000000000000002e286 < t Initial program 100.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6488.9
Applied rewrites88.9%
Final simplification67.8%
(FPCore (x y z t) :precision binary64 (if (<= t 3.7e+56) (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (* (sqrt (* 2.0 (fma z (* t t) z))) (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.7e+56) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else {
tmp = sqrt((2.0 * fma(z, (t * t), z))) * -y;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= 3.7e+56) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); else tmp = Float64(sqrt(Float64(2.0 * fma(z, Float64(t * t), z))) * Float64(-y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.7e+56], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{+56}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(z, t \cdot t, z\right)} \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < 3.69999999999999997e56Initial program 99.2%
Taylor expanded in t around 0
Applied rewrites67.1%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
*-rgt-identity67.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.1
Applied rewrites67.1%
if 3.69999999999999997e56 < t Initial program 98.1%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6482.1
Applied rewrites82.1%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6466.7
Applied rewrites66.7%
Final simplification67.1%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* 2.0 (fma z (* t t) z)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * fma(z, (t * t), z)));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * fma(z, Float64(t * t), z)))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z * N[(t * t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(z, t \cdot t, z\right)}
\end{array}
Initial program 99.0%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-exp.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sqrt.f64N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-exp.f6499.8
Applied rewrites99.8%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6486.2
Applied rewrites86.2%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* 2.0 z))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * z));
}
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 * 0.5d0) - y) * sqrt((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0
Applied rewrites56.4%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
*-rgt-identity56.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.4%
(FPCore (x y z t) :precision binary64 (* (sqrt (* 2.0 z)) (- y)))
double code(double x, double y, double z, double t) {
return sqrt((2.0 * z)) * -y;
}
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 = sqrt((2.0d0 * z)) * -y
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((2.0 * z)) * -y;
}
def code(x, y, z, t): return math.sqrt((2.0 * z)) * -y
function code(x, y, z, t) return Float64(sqrt(Float64(2.0 * z)) * Float64(-y)) end
function tmp = code(x, y, z, t) tmp = sqrt((2.0 * z)) * -y; end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot z} \cdot \left(-y\right)
\end{array}
Initial program 99.0%
Taylor expanded in t around 0
Applied rewrites56.4%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6432.9
Applied rewrites32.9%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
*-rgt-identity32.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6432.9
Applied rewrites32.9%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
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 * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024214
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))