--- type: "fhirpath-function" title: "FHIRPath Function: ln" function: "ln" category: "Math" section: "5.8.5" source: "fhirpath/functions.json" --- # FHIRPath Function: ln {:.stu} Returns the natural logarithm of the input (i.e. the logarithm base _e_). {:.stu} Accepts Decimal input types. Integer and Long types are also accepted via implicit conversion to Decimal. {:.stu} If the input collection is empty, the result is empty. {:.stu} If the input collection contains multiple items, the evaluation of the expression will end and signal an error to the calling environment. {:.stu} ``` fhirpath 1.ln() // 0.0 1.0.ln() // 0.0 ``` {:.stu} ## Summary - **Category**: Math - **Section**: `5.8.5` - **Return Type**: `Decimal` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description Returns the natural logarithm of the input (i.e. the logarithm base _e_). ## Arguments - none ## Type Mapping - `Integer-Decimal` - `Long-Decimal` - `Decimal-Decimal` ## Example ```fhirpath 1.ln() // 0.0 1.0.ln() // 0.0 ```