amath
1.8.5
Simple command line calculator
|
#include "prim.h"
Go to the source code of this file.
Macros | |
#define | REAL_PART(z) ((z).parts[0]) |
#define | IMAG_PART(z) ((z).parts[1]) |
Functions | |
double | creal (complex z) |
Real part of complex number. More... | |
double | cimag (complex z) |
Imaginary part of complex number. More... | |
double | cabs (complex z) |
Absolute value of complex number. More... | |
complex | conj (complex z) |
complex | cpack (double x, double y) |
Pack two real numbers into a complex number. More... | |
complex | ctrunc (complex z) |
Truncated value of complex number. More... | |
complex | cfloor (complex z) |
Floor value of complex number. More... | |
complex | cceil (complex z) |
Ceiling value of complex number. More... | |
complex | cround (complex z) |
Division of two complex numbers. More... | |
complex | cadd (complex y, complex z) |
Addition of two complex numbers. More... | |
complex | csub (complex y, complex z) |
Subtraction of two complex numbers. More... | |
complex | cmul (complex y, complex z) |
Multiplication of two complex numbers. More... | |
complex | cdiv (complex y, complex z) |
Division of two complex numbers. More... | |
complex | creci (complex z) |
Reciprocal value of complex number. More... | |
void | cchsh (double x, double *c, double *s) |
Calculate cosh and sinh. More... | |
void | cchc (double x, double *ch, double *c) |
Calculate cosh and cos. More... | |
double cabs | ( | complex | z | ) |
Addition of two complex numbers.
Definition at line 120 of file prim.c.
References cimag(), cpack(), and creal().
Referenced by ComplexNumber::Add(), cacos(), cacosh(), cacot(), cacoth(), cacsc(), cacsch(), casec(), casech(), casin(), casinh(), catan(), and catanh().
Ceiling value of complex number.
Definition at line 100 of file prim.c.
References ceil(), cimag(), cpack(), and creal().
Referenced by ComplexNumber::Ceiling().
void cchc | ( | double | x, |
double * | ch, | ||
double * | c | ||
) |
void cchsh | ( | double | x, |
double * | c, | ||
double * | s | ||
) |
Division of two complex numbers.
Definition at line 159 of file prim.c.
References cimag(), cpack(), and creal().
Referenced by cacot(), cacsc(), casec(), catan(), clog10(), clogb(), and ComplexNumber::Div().
Floor value of complex number.
Definition at line 90 of file prim.c.
References cimag(), cpack(), creal(), and floor().
Referenced by ComplexNumber::Floor().
double cimag | ( | complex | z | ) |
Imaginary part of complex number.
Definition at line 46 of file prim.c.
Referenced by cabs(), cadd(), cceil(), ccos(), ccosh(), ccot(), ccoth(), ccsc(), ccsch(), cdiv(), cexp(), cfloor(), clog(), cmul(), cpow(), creci(), cround(), csec(), csech(), csgn(), csin(), csinh(), csqrt(), csub(), ctan(), ctanh(), ctrunc(), ComplexNumber::GetDefaultPrecedence(), ComplexNumber::GetImagValue(), ComplexNumber::GetPrecedence(), DecimalSystem::GetText(), PositionalNumeralSystem::GetText(), ComplexNumber::IsInfinite(), ComplexNumber::IsNaN(), ComplexNumber::IsNegative(), ComplexNumber::IsZero(), ComplexNumber::Log(), ComplexNumber::Log10(), ComplexNumber::Log2(), and ComplexNumber::Unary().
Multiplication of two complex numbers.
Definition at line 140 of file prim.c.
References cimag(), cpack(), and creal().
Referenced by cacos(), cacosh(), cacot(), cacoth(), cacsc(), cacsch(), casec(), casech(), casin(), casinh(), catan(), catanh(), ccbrt(), and ComplexNumber::Mul().
complex cpack | ( | double | x, |
double | y | ||
) |
Pack two real numbers into a complex number.
Definition at line 68 of file prim.c.
Referenced by ComplexNumber::Add(), cacos(), cacosh(), cacot(), cacoth(), cacsc(), cacsch(), cadd(), casec(), casech(), casin(), casinh(), catan(), catanh(), ccbrt(), cceil(), ccos(), ccosh(), ccot(), ccoth(), ccsc(), ccsch(), cdiv(), cexp(), cfloor(), clog(), clog10(), clogb(), cmul(), ComplexNumber::ComplexNumber(), conj(), cpow(), creci(), cround(), csec(), csech(), csin(), csinh(), csqrt(), csub(), ctan(), ctanh(), ctrunc(), ComplexNumber::Div(), ComplexNumber::Mul(), ComplexNumber::Raise(), ComplexNumber::Sub(), and ComplexNumber::Unary().
double creal | ( | complex | z | ) |
Real part of complex number.
Definition at line 38 of file prim.c.
Referenced by cabs(), cadd(), cceil(), ccos(), ccosh(), ccot(), ccoth(), ccsc(), ccsch(), cdiv(), cexp(), cfloor(), clog(), cmul(), cpow(), creci(), cround(), csec(), csech(), csgn(), csin(), csinh(), csqrt(), csub(), ctan(), ctanh(), ctrunc(), ComplexNumber::GetDefaultPrecedence(), ComplexNumber::GetIntegerValue(), ComplexNumber::GetPrecedence(), ComplexNumber::GetRealValue(), DecimalSystem::GetText(), PositionalNumeralSystem::GetText(), ComplexNumber::IsInfinite(), ComplexNumber::IsNaN(), ComplexNumber::IsNegative(), ComplexNumber::IsZero(), ComplexNumber::Log(), ComplexNumber::Log10(), ComplexNumber::Log2(), ComplexNumber::PureComplexValue(), and ComplexNumber::Unary().
Reciprocal value of complex number.
Definition at line 181 of file prim.c.
References cimag(), conj(), cpack(), and creal().
Referenced by cacsch(), casec(), casech(), and ComplexNumber::Reciprocal().
Division of two complex numbers.
Definition at line 110 of file prim.c.
References cimag(), cpack(), creal(), and round().
Referenced by ComplexNumber::Round().
Subtraction of two complex numbers.
Definition at line 130 of file prim.c.
References cimag(), cpack(), and creal().
Referenced by cacos(), cacosh(), cacot(), cacoth(), cacsc(), casec(), casech(), casin(), catan(), catanh(), and ComplexNumber::Sub().
Truncated value of complex number.
Definition at line 80 of file prim.c.
References cimag(), cpack(), creal(), and trunc().
Referenced by ComplexNumber::Trunc().