As a portability person, I have to point out that current_arithmetic_function/1 is SWI-specific and not supported by any other Prolog system that I know of. As such, it isn’t useful when you’re writing code for multiple systems and want to check if an arithmetic function is supported by the current system. On non-SWI systems, the only way to check if an arithmetic function exists is to try calling it and check if it throws an error or not.
You can define a helper predicate like this that checks if an arithmetic function exists. This will use current_arithmetic_function/1 if possible and fall back to catch/3 otherwise. (Although for this use case current_arithmetic_function/1 doesn’t offer that much benefit, so it may be simpler to just always use the catch/3-based solution.)
:- if(predicate_property(current_arithmetic_function(_), _)).
% Use current_arithmetic_function/1 if possible (supported by SWI).
% Otherwise try to call the function and see if it works or not.
catch(_Res is FuncCall, _Error, false).
?- check_arithmetic_function(log(2, 4)).
| ?- check_arithmetic_function(log(2, 4)).
| ?- check_arithmetic_function(ceil(1.5)).