Asked by kenny

A function whose domain is all reals, and which maps all rational numbers to 1 and all irrational
numbers to 0.

Answers

Answered by Steve
not much to do except define at described. There are several functions which work with this kind of condition:

Thomae's function, which is 1/q when x=p/q (rational), and 0 when x is irrational

Dirichlet function is just as you describe

There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions