Skip to content

Samsara\Fermat\Complex\Types\Traits > ArithmeticComplexTrait

No description available

Inheritance

Has Traits

NumberNormalizationTrait

NumberNormalizationTrait
namespace
Samsara\Fermat\Core\Types\Traits
description

No description available

ArithmeticComplexHelperTrait

ArithmeticComplexHelperTrait
namespace
Samsara\Fermat\Complex\Types\Traits
description

No description available

Methods

Instanced Methods

public ArithmeticComplexTrait->add(string|int|float|Decimal|Fraction|ComplexNumber $num)

add

$num

type
string|int|float|Decimal|Fraction|ComplexNumber
description

return

type
Samsara\Fermat\Core\Values\MutableDecimal|Samsara\Fermat\Core\Values\ImmutableDecimal|Samsara\Fermat\Complex\Values\MutableComplexNumber|Samsara\Fermat\Complex\Values\ImmutableComplexNumber|Samsara\Fermat\Core\Values\MutableFraction|Samsara\Fermat\Core\Values\ImmutableFraction|static
description
No description available

public ArithmeticComplexTrait->divide(string|int|float|Decimal|Fraction|ComplexNumber $num, int|null $scale)

divide

$num

type
string|int|float|Decimal|Fraction|ComplexNumber
description
No description available

$scale

type
int|null
description

return

type
Samsara\Fermat\Core\Values\MutableDecimal|Samsara\Fermat\Core\Values\ImmutableDecimal|Samsara\Fermat\Complex\Values\MutableComplexNumber|Samsara\Fermat\Complex\Values\ImmutableComplexNumber|Samsara\Fermat\Core\Values\MutableFraction|Samsara\Fermat\Core\Values\ImmutableFraction|static
description
No description available

public ArithmeticComplexTrait->multiply(string|int|float|Decimal|Fraction|ComplexNumber $num)

multiply

$num

type
string|int|float|Decimal|Fraction|ComplexNumber
description

return

type
Samsara\Fermat\Core\Values\MutableDecimal|Samsara\Fermat\Core\Values\ImmutableDecimal|Samsara\Fermat\Complex\Values\MutableComplexNumber|Samsara\Fermat\Complex\Values\ImmutableComplexNumber|Samsara\Fermat\Core\Values\MutableFraction|Samsara\Fermat\Core\Values\ImmutableFraction|static
description
No description available

public ArithmeticComplexTrait->nthRoots(int|ImmutableDecimal $root, int|null $scale)

nthRoots

$root

type
int|ImmutableDecimal
description
No description available

$scale

type
int|null
description

return

type
array
description
No description available

public ArithmeticComplexTrait->pow(string|int|float|Decimal|Fraction|ComplexNumber $num, ?int $scale)

pow

$num

type
string|int|float|Decimal|Fraction|ComplexNumber
description

$scale

type
?int
description
No description available

return

type
Samsara\Fermat\Core\Values\MutableDecimal|Samsara\Fermat\Core\Values\ImmutableDecimal|Samsara\Fermat\Complex\Values\MutableComplexNumber|Samsara\Fermat\Complex\Values\ImmutableComplexNumber|Samsara\Fermat\Core\Values\MutableFraction|Samsara\Fermat\Core\Values\ImmutableFraction|static
description
No description available

public ArithmeticComplexTrait->sqrt(int|null $scale)

sqrt

$scale

type
int|null
description

return

type
Samsara\Fermat\Complex\Values\ImmutableComplexNumber|Samsara\Fermat\Complex\Values\MutableComplexNumber|Samsara\Fermat\Core\Values\ImmutableDecimal|static
description
No description available

public ArithmeticComplexTrait->subtract(string|int|float|Decimal|Fraction|ComplexNumber $num)

subtract

$num

type
string|int|float|Decimal|Fraction|ComplexNumber
description

return

type
Samsara\Fermat\Core\Values\MutableDecimal|Samsara\Fermat\Core\Values\ImmutableDecimal|Samsara\Fermat\Complex\Values\MutableComplexNumber|Samsara\Fermat\Complex\Values\ImmutableComplexNumber|Samsara\Fermat\Core\Values\MutableFraction|Samsara\Fermat\Core\Values\ImmutableFraction|static
description
No description available