Skip to content

potan/gdual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

gdual

Generic Dual numbers

Prelude> :load Math.GDual.Demo.SimpleSparseSolver

[1 of 1] Compiling Math.GDual.Demo.SimpleSparseSolver ( Math/GDual/Demo/SimpleSparseSolver.hs, interpreted )

Ok, modules loaded: Math.GDual.Demo.SimpleSparseSolver.

*Math.GDual.Demo.SimpleSparseSolver> :load Math.GDual

Ok, modules loaded: Math.GDual.

Prelude Math.GDual> :add Math.GDual.Demo.SimpleSparseSolver

[2 of 2] Compiling Math.GDual.Demo.SimpleSparseSolver ( Math/GDual/Demo/SimpleSparseSolver.hs, interpreted )

Ok, modules loaded: Math.GDual.Demo.SimpleSparseSolver, Math.GDual.

*Math.GDual.Demo.SimpleSparseSolver> import Math.GDual

*Math.GDual.Demo.SimpleSparseSolver Math.GDual> solve [[(0,1 :+- [1,0,0,0]),(1,2 :+- [0,1,0,0]),(2,3)],[(0,1 :+- [0,0,1,0]),(1,1 :+- [0,0,0,1]),(2,1)]]

Loading package array-0.4.0.1 ... linking ... done.

....

Loading package linear-1.10.1.1 ... linking ... done.

[[(2,-1.0+ε[-1.0,2.0,2.0,-4.0])],[(2,2.0+ε[1.0,-2.0,-1.0,2.0])]]

*Math.GDual.Demo.SimpleSparseSolver Math.GDual> import Linear

*Math.GDual.Demo.SimpleSparseSolver Math.GDual Linear> inv22 $ V2 (V2 (1 :+- [1,0,0,0]) (2 :+- [0,1,0,0])) (V2 (1 :+- [0,0,1,0]) (1 :+- [0,0,0,1]))

Just (V2 (V2 -1.0+ε[-1.0,1.0,2.0,-2.0] 2.0+ε[2.0,-1.0,-4.0,2.0]) (V2 1.0+ε[1.0,-1.0,-1.0,1.0] -1.0+ε[-2.0,1.0,2.0,-1.0]))

About

Generic Dual numbers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages