Numworks Epsilon  1.4.1
Graphing Calculator Operating System
hyperbolic_sine.h
Go to the documentation of this file.
1 #ifndef POINCARE_HYPERBOLIC_SINE_H
2 #define POINCARE_HYPERBOLIC_SINE_H
3 
7 
8 namespace Poincare {
9 
10 class HyperbolicSine : public StaticHierarchy<1> {
12 public:
13  Type type() const override;
14  Expression * clone() const override;
15  template<typename T> static Complex<T> computeOnComplex(const Complex<T> c, AngleUnit angleUnit);
16 private:
17  /* Layout */
18  ExpressionLayout * privateCreateLayout(PrintFloat::Mode floatDisplayMode, ComplexFormat complexFormat) const override {
19  return LayoutEngine::createPrefixLayout(this, floatDisplayMode, complexFormat, name());
20  }
21  int writeTextInBuffer(char * buffer, int bufferSize, int numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits) const override {
22  return LayoutEngine::writePrefixExpressionTextInBuffer(this, buffer, bufferSize, numberOfSignificantDigits, name());
23  }
24  const char * name() const { return "sinh"; }
25  /* Simplification */
26  Expression * shallowReduce(Context& context, AngleUnit angleUnit) override;
27  /* Evaluation */
28  Expression * privateApproximate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override {
29  return ApproximationEngine::map<float>(this, context, angleUnit,computeOnComplex<float>);
30  }
31  Expression * privateApproximate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override {
32  return ApproximationEngine::map<double>(this, context, angleUnit, computeOnComplex<double>);
33  }
34 };
35 
36 }
37 
38 #endif
c(generic_all_nodes)
static Complex< T > computeOnComplex(const Complex< T > c, AngleUnit angleUnit)
Type type() const override
static ExpressionLayout * createPrefixLayout(const Expression *expression, PrintFloat::Mode floatDisplayMode, Expression::ComplexFormat complexFormat, const char *operatorName)
static int writePrefixExpressionTextInBuffer(const Expression *expression, char *buffer, int bufferSize, int numberOfDigits, const char *operatorName)
Expression * clone() const override