There is a module for that: https://appstore.home.mendix.com/link/app/112522/Mendix/Math-Module
Regards,
Ronald