-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raising rational number to integer exponent yields floating-point result #2753
Comments
So However, the situation is different for |
What do you expect in stead of:
So far,
It is not clear what your use case is. Maybe you need an entirely new function/evaluable functor. |
I've corrected the original now, to omit the irrelevant |
Again, what about |
Only non-negative integer exponents are needed for my use-case, which involves computing the joint probability FWIW, doing this check did alert me to some missing sequences the DCG neglected to describe. |
Probabilities and exact sums? Sounds unusual to me. It seems you could live with a type error as shown above for integers, this time only for rationals that result in non-rational value. |
With an arbitrary vector of rational toxicity-probabilities, one can rather easily assign an exact probability of occurrence to each possible trial realization described by declarative code (here, a DCG). The sum of these probabilities then gives a convenient check that all possibilities considered by the [relatively easy] probability calculation are accounted-for by the [more difficult] code. (I will even venture that the Girsanov theorem lends some justification to such arbitrary probability choices.) At any rate, here's the result; it is at least much tidier now; floating-point is so gauche! ;) |
Cf. #2752 (comment)
The text was updated successfully, but these errors were encountered: