You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In implementing some numeric predicates, I would like to be able to throw useful errors when arguments fall outside their domains. It looks to me as if the number-related predicates in library(error) deal only with integers.
In gamma/2 as implemented here, it might be reasonable to reject negative integral values of X, where the function is undefined. Letting the Rust code in crate puruspe be in charge of matters results in this:
This looks very similar to 1/x where at x = 0 there is one such point which can be seen as being both +∞ and -∞.
?- X = 0, Y is X ** -1.
error(evaluation_error(undefined),(is)/2).
?- X = 0, Y is 1/X.
error(evaluation_error(zero_divisor),(/)/2).
Assigning to this a domain seems to be quite artificial, as in some sense there are two values. There used to be that +−∞ in proximity to some Unum version. Not sure how Type III takes it.
In implementing some numeric predicates, I would like to be able to throw useful errors when arguments fall outside their domains. It looks to me as if the number-related predicates in
library(error)
deal only with integers.Related to #1309 perhaps.
The text was updated successfully, but these errors were encountered: