fnFormatNumber is designed only to work with integers since it is specifically designed for displaying the paging information in DataTables which fundamentally has to be an integer! So there was no need to cope with floating point numbers.
I'd suggest not using fnFormatNumber if you want to work with formatted numbers outside of the core DataTables functions, since it is effectively an internal function.
It would be possible to alter the default function to suit your needs ( https://github.com/DataTables/DataTables/blob/master/media/src/model/model.defaults.js#L928 ), but you might want to consider using a number formatting library that is specifically designed or just a simple function. There is an example here: http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript/149099#149099 .
Replies
I'd suggest not using fnFormatNumber if you want to work with formatted numbers outside of the core DataTables functions, since it is effectively an internal function.
It would be possible to alter the default function to suit your needs ( https://github.com/DataTables/DataTables/blob/master/media/src/model/model.defaults.js#L928 ), but you might want to consider using a number formatting library that is specifically designed or just a simple function. There is an example here: http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript/149099#149099 .
Allan