hakaru-CS4ZP6 / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

exponents with negative base #50

Closed sohraa3 closed 6 years ago

sohraa3 commented 6 years ago

It seems that hakaru can not evaluate exponents with a negative base. (-1.0)**3 gives me expected prob, found real

JacquesCarette commented 6 years ago

This is badly documented. ** is 'real powering' for the function of type prob -> real -> prob while ^ is 'nat poweringof typereal -> nat -> real`. You want the latter.