| |||||||||||
Small maths errors in Tcl Posted by admin (Graham Ellis), 18 January 2005 Regular question - "why is my answer slightly wrong". Answer is usually "because you did an integer divide". If both parts of a division are integer in Tcl, an integer division is performed, otherwise a floating point division happens.Sample program: Code:
And sample results: Code:
This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
Other Forum Posts Follow us on ... | ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |