?

Average Error: 0.1 → 0.1
Time: 13.7s
Precision: binary64
Cost: 13248

?

\[x \cdot \sin y + z \cdot \cos y \]
\[x \cdot \sin y + z \cdot \cos y \]
(FPCore (x y z) :precision binary64 (+ (* x (sin y)) (* z (cos y))))
(FPCore (x y z) :precision binary64 (+ (* x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
	return (x * sin(y)) + (z * cos(y));
}
double code(double x, double y, double z) {
	return (x * sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * sin(y)) + (z * cos(y))
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
	return (x * Math.sin(y)) + (z * Math.cos(y));
}
public static double code(double x, double y, double z) {
	return (x * Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z):
	return (x * math.sin(y)) + (z * math.cos(y))
def code(x, y, z):
	return (x * math.sin(y)) + (z * math.cos(y))
function code(x, y, z)
	return Float64(Float64(x * sin(y)) + Float64(z * cos(y)))
end
function code(x, y, z)
	return Float64(Float64(x * sin(y)) + Float64(z * cos(y)))
end
function tmp = code(x, y, z)
	tmp = (x * sin(y)) + (z * cos(y));
end
function tmp = code(x, y, z)
	tmp = (x * sin(y)) + (z * cos(y));
end
code[x_, y_, z_] := N[(N[(x * N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(N[(x * N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \sin y + z \cdot \cos y
x \cdot \sin y + z \cdot \cos y

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.1

    \[x \cdot \sin y + z \cdot \cos y \]
  2. Final simplification0.1

    \[\leadsto x \cdot \sin y + z \cdot \cos y \]

Alternatives

Alternative 1
Error16.7
Cost7120
\[\begin{array}{l} t_0 := \sin y \cdot x\\ t_1 := \cos y \cdot z\\ \mathbf{if}\;x \leq -1.12 \cdot 10^{+125}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+61}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error9.1
Cost6984
\[\begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+107}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \sin y + z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error17.0
Cost6856
\[\begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{-6}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-26}:\\ \;\;\;\;y \cdot x + z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error39.0
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-125}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.76 \cdot 10^{-267}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 5
Error31.2
Cost320
\[y \cdot x + z \]
Alternative 6
Error39.4
Cost64
\[z \]

Error

Reproduce?

herbie shell --seed 2023064 
(FPCore (x y z)
  :name "Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, B"
  :precision binary64
  (+ (* x (sin y)) (* z (cos y))))