qumas.MicrolensingAnalysis.utils module

format_scientific(value, precision=3)[source]

Format a value in scientific notation with a specified number of decimal places.

Parameters:
  • value (float) – The value to be formatted.

  • precision (int) – The number of decimal places for the coefficient.

Returns:

The formatted value in scientific notation.

Return type:

str