### 3 unstable releases

0.2.0 | Dec 5, 2020 |
---|---|

0.1.1 | May 14, 2019 |

0.1.0 | Apr 18, 2019 |

#**476** in Math

**MIT/Apache**

49KB

1.5K
SLoC

# hcomplex

Lightweight complex and hypercomplex algebra library.

## Contents

- Complex and hypercomplex numbers:

- 2-dimensional commutative and associative algebra.`Complex``<`T`>`

- 4-dimensional associative but non-commutative algebra.`Quaternion``<`T`>`

- 8-dimensional non-commutative and non-associative algebra.`Octonion``<`T`>`

- 16-dimensional non-commutative and non-associative algebra with nontrivial zero divisors.`Sedenion``<`T`>`- and following algebras created by Cayley-Dickson construction

where`Construct``<`T, A`<`T`>``>`

is previous algebra.`A``<`T`>`

- Transformations:

- Moebius transform, where`transform`Moebius`::``<`T, A`<`T`>``>`

is some algebra.`A``<`T`>`

To construct hypercomplex types from your own type you need to implement

trait for it.`Algebra`

## Crate Features

Crate could be used in

mode.`no_std`

- Use`std`

. Enabled by default.`std`

- Hypercomplex number random generator.`random`

- Approximate comparison of hypercomplex numbers.`approx`

## Testing

`cargo`` test`` --`features random,approx

## License

Licensed under either of

- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

#### Dependencies

~0.6â€“0.8MB

~16K SLoC