8000 GitHub - hkinke/hax: single variable automatic differentiation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hkinke/hax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hax

Single variable automatic differentiation

Example

We use the function $f(x)=\cos(\sin(x)+1)$

module Main where

import Hax

main:: IO ()
main=let f=gcos $ (gsin gid) |+| (gconstant 1.0)
         df_dx=gradient f
         d2f_dx2=gradient df_dx
      print $ evaluate f 1.0
      print $ evaluate df_dx 1.0
      print $ evaluate d2f_dx2 1.0

About

single variable automatic differentiation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0