1
$\begingroup$

To clarify, in haskell, there is an ord function that gives the byte integer of a character (i.e. ord 'a' yields 97); and there is a char function that takes the byte integer of a character and returns the character (i.e. char 97 yelds 'a'.

What is the name of a collection of such functions? I'm not very mathematically literate (I'm working on it), but I found semirings on wikipedia. Do semirings provide an appropriate description?

$\endgroup$

1 Answer 1

2
$\begingroup$

These are known as inverse functions. For example, the mappings $x \mapsto 2x$ and $x \mapsto x/2$ are inverses of each other, as are $\exp$ and $\log$ (restricted to positive numbers), or $\sin$ (restricted to the interval $[-\pi/2,\pi/2]$) and $\arcsin$.

$\endgroup$
1
  • $\begingroup$ Ha! Of course. It's so obvious when you say it. Thanks $\endgroup$ Commented Mar 8, 2014 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.