Question: define an integer predicate

I am having trouble with understanding how to use piecewise to define a function f such that

f(x) = 1 whenever the VALUE of x is an integer (thus f((2^(0.5) - 1.0)*(2^(0.5) + 1.0)) = 1).

f(x) = 0 otherwise.

 

Please Wait...