Scientific format problem

Scientific format problem

Symptom

A report running normally for a while, all the sudden yearly report went wrong as shown on the following figure.

Investigation

The exception has thrown from web api.

The cause is scientific format number conversion. We know when the float number is too small, e.g. 0.00001, it will be output as scientific format. However large number seems not be output as scientific format, but somehow it happened.

Fix

To fix this issue, I cast the float into decimal to avoid scientific format output.

Leave a Reply