AFSimple_Calculate (doc) is the default function for calculate action's that is added when modifying "Calculate" in the Text Field Properties in Adobe Acrobat Pro:
(This is how you add the calculate function in Adobe)
- Updating the text field based on the result of a calculate action.
- Some way to handle localized numbers. (e.g. in German 1.3 is 1,3)
- A unit test :-)
Here is a behavior comparison between Adobe and Okular (with the patches):