Average Error: 0.3 → 0.4
Time: 30.3s
Precision: 64
Internal Precision: 128
\[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
\[(e^{\log \left(e^{\log_* (1 + \frac{1 - \tan x \cdot \tan x}{\tan x \cdot \tan x + 1})}\right)} - 1)^*\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\]
  2. Using strategy rm
  3. Applied expm1-log1p-u0.4

    \[\leadsto \color{blue}{(e^{\log_* (1 + \frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x})} - 1)^*}\]
  4. Using strategy rm
  5. Applied add-log-exp0.4

    \[\leadsto (e^{\color{blue}{\log \left(e^{\log_* (1 + \frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x})}\right)}} - 1)^*\]
  6. Final simplification0.4

    \[\leadsto (e^{\log \left(e^{\log_* (1 + \frac{1 - \tan x \cdot \tan x}{\tan x \cdot \tan x + 1})}\right)} - 1)^*\]

Runtime

Time bar (total: 30.3s)Debug logProfile

herbie shell --seed 2018348 +o rules:numerics
(FPCore (x)
  :name "Trigonometry B"
  (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))