-- | This module provides
--
-- @instance (`Fractional'` a, `Floating` a) => `Floating` (`Data` a)@

module Feldspar.Core.Functions.Floating where

import Feldspar.Core.Types
import Feldspar.Core.Representation
import Feldspar.Core.Constructs
import Feldspar.Core.Functions.Fractional

instance (Fractional' a, Floating a) => Floating (Data a) where
  pi        = value Prelude.pi
  exp       = function1 "exp"     fullProp Prelude.exp
  sqrt      = function1 "sqrt"    fullProp Prelude.sqrt
  log       = function1 "log"     fullProp Prelude.log
  (**)      = function2 "(**)"    fullProp (Prelude.**)
  logBase   = function2 "logBase" fullProp Prelude.logBase
  sin       = function1 "sin"     fullProp Prelude.sin
  tan       = function1 "tan"     fullProp Prelude.tan
  cos       = function1 "cos"     fullProp Prelude.cos
  asin      = function1 "asin"    fullProp Prelude.asin
  atan      = function1 "atan"    fullProp Prelude.atan
  acos      = function1 "acos"    fullProp Prelude.acos
  sinh      = function1 "sinh"    fullProp Prelude.sinh
  tanh      = function1 "tanh"    fullProp Prelude.tanh
  cosh      = function1 "cosh"    fullProp Prelude.cosh
  asinh     = function1 "asinh"   fullProp Prelude.asinh
  atanh     = function1 "atanh"   fullProp Prelude.atanh
  acosh     = function1 "acosh"   fullProp Prelude.acosh