MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / Tan

Function Tan

extern/ttmath/ttmath.h:613–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611 */
612 template<class ValueType>
613 ValueType Tan(const ValueType & x, ErrorCode * err = 0)
614 {
615 ValueType result = Cos(x, err);
616
617 if( err && *err != err_ok )
618 return result;
619
620 if( result.IsZero() )
621 {
622 if( err )
623 *err = err_improper_argument;
624
625 result.SetNan();
626
627 return result;
628 }
629
630 return Sin(x, err) / result;
631 }
632
633
634 /*!

Callers 1

TgFunction · 0.85

Calls 3

CosFunction · 0.85
SinFunction · 0.85
IsZeroMethod · 0.80

Tested by

no test coverage detected