Learn and Learn

Learn And Learn - great place for tutorials, references and how-to

GoLang – Find Exponential – Pow10() Function – Examples & Explanation

Pow10() function is used to find the 10**e, the base-10 exponential of e in Go language. The standard math package of Go programming language has Pow10() function.

Syntax of Pow10() Function in Go Language

The syntax of Pow10() function in Go Language is:

Note: float64 is a data type in Go language which has IEEE-754 64-bit floating-point numbers.
int is a signed integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, int32.

Special cases are:
Pow10(e) = +Inf for e > 309
Pow10(e) = 0 for e < -324


Parameters of Pow10() Function in Go Language

e – Where e is any Valid int Input value. This parameter is required.


Error Handling

If the e parameter is not a number (numeric value) Pow10() function returns an error .
If there is no argument (e – input value) passes to the function, then the compiler will produce an error.


Return Value of Pow10() Function in Go Language

Pow10() function will return 10**e, the base-10 exponential of e.


GoLang Pow10() Function Example 1



GoLang Pow10() Function Example 2



GoLang Pow10() Function Example 3



LearnAndLearn.com © 2018 - All rights reserved