fix int vs float issue
add mathematical example