Skip to content

Scientific Notation

Type Registry

Scientific Notation

representation.numeric.scientific_notation

Number in scientific notation (e.g., 1.23e-4, 5E+6, 3.14e10). Transforms to DOUBLE.

Domain representationnumeric
Casts to DOUBLE
Scope Universal

Try it

CLI
$ finetype infer -i "1.23e-4"
→ representation.numeric.scientific_notation

DuckDB

Detect
SELECT finetype('1.23e-4');
-- → 'representation.numeric.scientific_notation'
Cast expression
CAST({col} AS DOUBLE)
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS DOUBLE) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'representation.numeric.scientific_notation';

Struct Expansion

exponent: CAST(REGEXP_EXTRACT({col}, 'e([+-]?[0-9]+)$') AS SMALLINT)
mantissa: CAST(REGEXP_EXTRACT({col}, '^([0-9.+-]+)e') AS DOUBLE)

JSON Schema

finetype schema representation.numeric.scientific_notation
{
  "$id": "https://noon.sh/schemas/representation.numeric.scientific_notation",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Number in scientific notation (e.g., 1.23e-4, 5E+6, 3.14e10). Transforms to DOUBLE.",
  "examples": [
    "1.23e-4",
    "5E+6",
    "3.14e10",
    "-2.5e-3"
  ],
  "pattern": "^-?[0-9]+(\\.[0-9]+)?[eE][+-]?[0-9]+$",
  "title": "Scientific Notation",
  "type": "string"
}

Examples

1.23e-45E+63.14e10-2.5e-3

Also known as

scientificexponential

Types in representation