---
title: "log"
canonical: "https://support.appfire.com/space/PSJC/433654548/log"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Returns the logarithm of a number to the base you specify.

Returns the logarithm of a number to the base you specify.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | log(number, base) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| number | Number | Yes | Positive real number you want the logarithm for. |
| base | Number | Yes | Base of the logarithm. |

## Return Type

**Number**

## Example

```javascript
number a = log(100, 10); print("a= " + a); number b = log(8, 2); print("b= " + b);
```


Prints:

        a= 2;

        b= 3;


## See also

> Macro (contentbylabel)