Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

elixir-nx/complex

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complex

Complex is a library for types and mathematical functions for complex numbers.

Each complex number is represented as a structure holding the real and imaginary part. There are functions for creation and manipulation of them. Users can use Complex.Kernel to get operators to work on a mix of real and complex numbers.

Installation

Add complex as a dependency in your mix.exs file.

def deps do
  [{:complex, "~> 0.4.1"}]
end

After you are done, run mix deps.get in your shell to fetch and compile Complex. Start an interactive Elixir shell with iex -S mix and try the examples in the examples section.

Documentation

Documentation for the package is available online via Hex at http://hexdocs.pm/complex. You can also generate local docs via the mix task

mix docs

This will generate the HTML documentation and place it into the doc subdirectory.

Examples

iex> Complex.new(3, 4)
%Complex{im: 4.0, re: 3.0}

iex> Complex.new(0, 1)
%Complex{im: 1.0, re: 0.0}

License

Copyright 2015 Thomas Krauss

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Elixir library for types and mathematical functions for complex numbers

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.