IMLN function
PRO BASIC
The IMLN function in Jspreadsheet Formulas Pro is a mathematical tool that allows you to find the natural logarithm of a complex number. A complex number is a number that includes both a real part and an imaginary part. By using IMLN, you input your complex number and the formula will output its natural logarithm. This function is especially useful in advanced math or physics calculations that involve complex numbers.
Documentation
Returns the natural logarithm of a complex number.
Category
Engineering
Syntax
IMLN(inumber)
| Parameter | Description | 
|---|---|
inumber | 
The complex number for which you want to calculate the natural logarithm. | 
Behavior
The IMLN function is used to return the natural logarithm of a complex number. Here is how it handles various inputs:
- Empty cells: If the 
IMLNfunction is used on an empty cell, it will return an error because it needs a complex number to perform the calculation. - Text: The 
IMLNfunction does not work with text. If a cell containing text is used as an argument, the function will return an error. - Booleans: The 
IMLNfunction does not work with Boolean values. If a cell containing a Boolean value is used as an argument, the function will return an error. - Errors: If the cell used as an argument contains an error, the 
IMLNfunction will also return an error. - Complex Numbers: The 
IMLNfunction is designed to work with complex numbers. It will return the natural logarithm of the complex number provided as an argument. 
Common Errors
| Error | Description | 
|---|---|
| #VALUE! | This error occurs when the input to the IMLN function is not a valid complex number. | 
| #NUM! | This error occurs when the input is a purely real negative number (imaginary part = 0), which is outside the valid domain for real logarithms. | 
| #DIV/0! | This error occurs when the complex number provided as an argument is 0. | 
Best practices
- Always ensure that the input to the
 IMLNfunction is a valid complex number.- Avoid using cells that contain text, Boolean values, or errors as arguments to the
 IMLNfunction as this will result in an error.- Handle zero input carefully to avoid the #DIV/0! error.
 
Usage
A few examples using the IMLN function.
IMLN("1+i")     // Returns 0.346573590279973+0.785398163397448i
IMLN("2+2i")    // Returns 1.03972077083992+0.785398163397448i
IMLN("5-3i")    // Returns 1.76318026230808-0.540419500270584i
Interactive Spreadsheet Demo
<html>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script>
<div id="spreadsheet"></div>
<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('MjI4ZWQ0ZjkzOWM0NTFjYzIxMDZlNDM0OTZmOGI1MmY4ZDIxNjYwYjgwN2FjMjE5ZjdhZDhjN2U2ZjAxODBkMzc0ZDBmODU4NzVhZGIyNWZmMmEyMjI3MmIxNjk5ZGJiZTJlN2RiNmI5N2ViMzhiNjFhNTlkMDk1MmE2YmM3ZTQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJORFF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
// Create a new spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
  worksheets: [{
    data: [
    [
        "Complex Number",
        "Natural Logarithm"
    ],
    [
        "1+i",
        "=IMLN(A2)"
    ],
    [
        "2+2i",
        "=IMLN(A3)"
    ],
    [
        "5-3i",
        "=IMLN(A4)"
    ],
    [
        "-1+0i",
        "=IMLN(A5)"
    ]
]
  }]
});
</script>
</html>
import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from "@jspreadsheet/formula-pro";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('MjI4ZWQ0ZjkzOWM0NTFjYzIxMDZlNDM0OTZmOGI1MmY4ZDIxNjYwYjgwN2FjMjE5ZjdhZDhjN2U2ZjAxODBkMzc0ZDBmODU4NzVhZGIyNWZmMmEyMjI3MmIxNjk5ZGJiZTJlN2RiNmI5N2ViMzhiNjFhNTlkMDk1MmE2YmM3ZTQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJORFF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default function App() {
    // Spreadsheet array of worksheets
    const spreadsheet = useRef();
    // Worksheet data
    const data = [
    [
        "Complex Number",
        "Natural Logarithm"
    ],
    [
        "1+i",
        "=IMLN(A2)"
    ],
    [
        "2+2i",
        "=IMLN(A3)"
    ],
    [
        "5-3i",
        "=IMLN(A4)"
    ],
    [
        "-1+0i",
        "=IMLN(A5)"
    ]
];
    // Render component
    return (
        <Spreadsheet ref={spreadsheet}>
            <Worksheet data={data} />
        </Spreadsheet>
    );
}
<template>
    <Spreadsheet ref="spreadsheet">
        <Worksheet :data="data" />
    </Spreadsheet>
</template>
<script>
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/vue";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
import formula from "@jspreadsheet/formula-pro";
// Set license
jspreadsheet.setLicense('MjI4ZWQ0ZjkzOWM0NTFjYzIxMDZlNDM0OTZmOGI1MmY4ZDIxNjYwYjgwN2FjMjE5ZjdhZDhjN2U2ZjAxODBkMzc0ZDBmODU4NzVhZGIyNWZmMmEyMjI3MmIxNjk5ZGJiZTJlN2RiNmI5N2ViMzhiNjFhNTlkMDk1MmE2YmM3ZTQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJORFF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default {
    components: {
        Spreadsheet,
        Worksheet,
    },
    data() {
        // Worksheet data
        const data = [
    [
        "Complex Number",
        "Natural Logarithm"
    ],
    [
        "1+i",
        "=IMLN(A2)"
    ],
    [
        "2+2i",
        "=IMLN(A3)"
    ],
    [
        "5-3i",
        "=IMLN(A4)"
    ],
    [
        "-1+0i",
        "=IMLN(A5)"
    ]
]
        return {
            data
        };
    }
}
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import * as formula from "@jspreadsheet/formula-pro";
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('MjI4ZWQ0ZjkzOWM0NTFjYzIxMDZlNDM0OTZmOGI1MmY4ZDIxNjYwYjgwN2FjMjE5ZjdhZDhjN2U2ZjAxODBkMzc0ZDBmODU4NzVhZGIyNWZmMmEyMjI3MmIxNjk5ZGJiZTJlN2RiNmI5N2ViMzhiNjFhNTlkMDk1MmE2YmM3ZTQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJORFF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
@Component({
    standalone: true,
    selector: "app-root",
    template: `<div #spreadsheet></div>`
})
export class AppComponent {
    @ViewChild("spreadsheet") spreadsheet: ElementRef;
    // Worksheets
    worksheets: jspreadsheet.worksheetInstance[];
    // Create a new data grid
    ngAfterViewInit() {
        // Create spreadsheet
        this.worksheets = jspreadsheet(this.spreadsheet.nativeElement, {
            worksheets: [{
                data: [
    [
        "Complex Number",
        "Natural Logarithm"
    ],
    [
        "1+i",
        "=IMLN(A2)"
    ],
    [
        "2+2i",
        "=IMLN(A3)"
    ],
    [
        "5-3i",
        "=IMLN(A4)"
    ],
    [
        "-1+0i",
        "=IMLN(A5)"
    ]
]
            }]
        });
    }
}