FormatFloat function bug

The following code generates the string "1.00" which is clearly not correct - it should be (as it is in Delphi) "0.00"

aVal := 1e-25;
l_FormatedResult.Caption := FormatFloat('#,##0.00',aVal);

image

A few more examples of this problem:
First 1e-5 works ok:
image
but 1e-6 and 1e-7 are both very strange:
image
1e-8 also not right:
image

Other formatting functions do not appear to exhibit this problem:
image

This is a RTL functionality of pas2js. We reported it to the pas2js team and will incorporate fixes as soon as this is handled.

Thanks Bruno - I suspected that.