# Funções numéricas gerais

Nestas funções numéricas gerais, os argumentos são expressões em que x deve ser interpretado como um número de valor real. Todas as funções podem ser usadas em scripts de carregamento ou expressões de gráfico.

Use a caixa suspensa em cada função para ver uma breve descrição e a sintaxe de cada função. Clique no nome da função na descrição da sintaxe para obter detalhes.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### bitcount

BitCount() descobre quantos bits no equivalente binário de um número estão definidos como 1. Isto é, a função retorna o número de bits definidos em integer\_number, em que integer\_number é interpretado como um número inteiro assinado de 32 bits.

[**bitcount**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/bitcount.htm)(integer\_number)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### div

Div() retorna a parte inteira da divisão aritmética do primeiro argumento pelo segundo argumento. Os dois parâmetros são interpretados como números reais, isto é, não precisam ser inteiros.

[**div**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/div.htm)(integer\_number1, integer\_number2)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fabs

Fabs() retorna o valor absoluto de x. O resultado é um número positivo.

[**fabs**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/fabs.htm)(x)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fact

Fact() retorna o fatorial de um inteiro positivo x.

[**fact**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/fact.htm)(x)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### frac

Frac() retorna a fração à direita do ponto decimal de x, em que x é um número real.

[**frac**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/frac.htm)(x)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### sign

Sign() retorna 1, 0 ou -1, dependendo se x for um número positivo, 0 ou um número negativo.

[**sign**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/sign.htm)(x)

## Funções de combinação e permutação

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### combin

Combin() retorna o número de combinações de elementos q que podem ser coletados de um grupo de itens p. Como representado pela fórmula: `Combin(p,q) = p! / q!(p-q)!` A ordem de seleção dos itens é insignificante.

[**combin**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/combin.htm)(p, q)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### permut

Permut() retorna o número de permutas de elementos q que podem ser selecionadas de um grupo de itens p. Como representado pela fórmula: `Permut(p,q) = (p)! / (p - q)!` A ordem na qual os itens são selecionados é significativa.

[**permut**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/permut.htm)(p, q)

## Funções modulares

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fmod

fmod() é uma função de módulo que retorna a parte restante da divisão do primeiro argumento (o dividendo) pelo segundo argumento (o divisor). O resultado é um número real. Os dois argumentos são interpretados como números reais, isto é, não precisam ser inteiros.

[**fmod**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/fmod.htm)(a, b)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### mod

Mod() é uma função de módulo que retorna o restante não negativo de uma divisão de inteiro. O primeiro argumento é o dividendo e o segundo é o divisor. Os dois argumentos devem ser valores inteiros.

[**mod**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/mod.htm)(integer\_number1, integer\_number2)

## Funções de paridade

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### even

Even() retorna True (-1), se integer\_number for um número inteiro par ou zero. Retorna False (0), se integer\_number for um número inteiro ímpar, e NULL se integer\_number não for um número inteiro.

[**even**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/even.htm)(integer\_number)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### odd

Odd() retorna True (-1), se integer\_number for um número inteiro ímpar ou zero. Retorna False (0), se integer\_number for um número inteiro par, e NULL se integer\_number não for um número inteiro.

[**odd**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/odd.htm)(integer\_number)

## Funções de arredondamento

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### ceil

Ceil() arredonda x para o múltiplo mais próximo de step [+ offset]. O valor padrão de offset é 0.

[**ceil**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/ceil.htm)(x[, step[, offset]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### floor

Floor() arredonda x para baixo até o múltiplo mais próximo de step [+ offset]. O valor padrão de offset é 0.

[**floor**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/floor.htm)(x[, step[, offset]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### round

Round() retorna o resultado de arredondar x para cima ou para baixo, para o múltiplo mais próximo de step [+ offset]. O valor padrão de offset é 0.

[**round**](https://help.qlik.com/pt-BR/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/round.htm)( x [ , step [ , offset ]])