Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Is there a word for function like this...?

  • 18-07-2005 02:32PM
    #1
    Closed Accounts Posts: 857 ✭✭✭


    Is there a word for a function that satisfies:

    f(f(x)) = f(x)

    As an example of such a function, consider f(x) = x modulo 5

    f(33) = 3
    f(3) = 3

    I'm betting there's a name for this but I have no idea what it is. Any thoughts?


Comments

  • Moderators, Social & Fun Moderators Posts: 10,501 Mod ✭✭✭✭ecksor


    The word you're looking for is Indempotent.


  • Closed Accounts Posts: 857 ✭✭✭davros


    Yep, that's it. From the Wikipedia:
    A unary operation (i.e., a function), is idempotent if, whenever it is applied twice to any element, it gives the same result as if it were applied once. For example, the greatest integer function is idempotent as a function from the set of real numbers to the set of integers.

    Actually, I've often heard that word used in the context of HTTP but I always assumed it meant no change (to a database, say) ever, even on the first invocation.

    Thanks for that, ecksor.


Advertisement