Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

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

  • 18-07-2005 1: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