Type to search.

ES|QL SCALB function

Serverless

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack 9.1+

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available since 9.1

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Returns the result of multiplying a number by 2 raised to a scale factor.

Embedded
Embedded
d
Numeric expression for the multiplier. If null, the function returns null.
scaleFactor

Numeric expression for the scale factor. If null, the function returns null.

Returns the result of d * 2 ^ scaleFactor, Similar to Java's scalb function. Result is rounded as if performed by a single correctly rounded floating-point multiply to a member of the double value set.

d scaleFactor result
double integer double
double long double
integer integer double
integer long double
long integer double
long long double
unsigned_long integer double
unsigned_long long double
ES|QL
row x = 3.0, y = 10 | eval z = scalb(x, y)
x:double y:integer z:double
3.0 10 3072.0