Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions haskell/Language/Hakaru/Pretty/Maple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ maplePrimOp Not (e1 :* End) = app1 "Not" e1
maplePrimOp Pi End = showString "Pi"
maplePrimOp Cos (e1 :* End) = app1 "cos" e1
maplePrimOp Sin (e1 :* End) = app1 "sin" e1
maplePrimOp Tan (e1 :* End) = app1 "tan" e1
maplePrimOp RealPow (e1 :* e2 :* End) =
parens (arg e1 . showString " ^ " . arg e2)
maplePrimOp Choose (e1 :* e2 :* End) = app2 "binomial" e1 e2
Expand Down
1 change: 1 addition & 0 deletions haskell/Tests/RoundTrip.hs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ testStdChiSqRelations = test [

testCauchyRelations :: Test
testCauchyRelations = test [
"t_uniform_to_cauchy" ~: testConcreteFiles "tests/RoundTrip/t_uniform_to_cauchy.0.hk" "tests/RoundTrip/t_uniform_to_cauchy.expected.hk",
"t_cauchy_add_transformation" ~: testConcreteFiles "tests/RoundTrip2/t_cauchy_add_transformation.0.hk" "tests/RoundTrip2/t_cauchy_add_transformation.expected.hk",
"t_cauchy_sub_transformation" ~: testConcreteFiles "tests/RoundTrip2/t_cauchy_sub_transformation.0.hk" "tests/RoundTrip2/t_cauchy_sub_transformation.expected.hk"
]
Expand Down
2 changes: 2 additions & 0 deletions tests/RoundTrip/t_uniform_to_cauchy.0.hk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
X <~ uniform(0, 1)
return tan(pi * (X - 1/2))
5 changes: 5 additions & 0 deletions tests/RoundTrip/t_uniform_to_cauchy.expected.hk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#cauchy(0,1)
X1 <~ normal(+0/1, 1/1)
X2 <~ normal(+0/1, 1/1)
return X1/X2