Open
PrevPrevious commit
Next Next commit
docs: add README for exp10f
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
  • Loading branch information
@Deepak91168
Deepak91168 committedJun 17, 2025
commit 370278270afe5258ed22ac80cdba569889714e7a
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
<!--

@license Apache-2.0

Copyright (c) 2025 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# exp10f

> Base `10` [single-precision exponential function][exponential-function].

<section class="usage">

## Usage

```javascript
var exp10f = require( '@stdlib/math/base/special/exp10f' );
```

#### exp10f( x )

Evaluates the base `10` [single-precision exponential function][exponential-function].

```javascript
var v = exp10f( 3.0 );
// returns 1000.0

v = exp10f( -9.0 );
// returns 9.999999717180685e-10

v = exp10f( 0.0 );
// returns 1.0

v = exp10f( NaN );
// returns NaN
```

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var exp10f = require( '@stdlib/math/base/special/exp10f' );
var uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );

var opts = {
'dtype': 'float64'
};
var x = uniform( 100, -50.0, 50.0, opts );

// Convert to single-precision:
x = x.map( float64ToFloat32 );

logEachMap( '10^%0.4f = %0.4f', x, exp10f );
```

</section>

<!-- /.examples -->

* * *

<section class="c">

## C APIs

<section class="intro">

C API providing a base 10 single-precision exponential function.

</section>

<!-- /.intro -->

<section class="usage">

### Usage

```c
#include "stdlib/math/base/special/exp10f.h"
```

#### stdlib_base_exp10f( x )

Evaluates the base `10` [single-precision exponential function][exponential-function].

```c
float out = stdlib_base_exp10f( 3.0f );
// returns 1000.0f

out = stdlib_base_exp10f( -9.0f );
// returns 1.0e-9f
```

The function accepts the following arguments:

- **x**: `[in] float` input value.

```c
float stdlib_base_exp10f( const float x );
```

</section>

<!-- /.usage -->

<section class="notes">

</section>

<!-- /.notes -->

<section class="examples">

### Examples

```c
#include "stdlib/math/base/special/exp10f.h"
#include <stdlib.h>
#include <stdio.h>

int main( void ) {
float x;
float v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (float)rand() / (float)RAND_MAX ) * 100.0f ) - 50.0f;
v = stdlib_base_exp10f( x );
printf( "10^%f = %f\n", x, v );
}
}
```

</section>

<!-- /.examples -->

</section>

<!-- /.c -->

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/math/base/special/exp`][@stdlib/math/base/special/exp]</span><span class="delimiter">: </span><span class="description">natural exponential function.</span>
- <span class="package-name">[`@stdlib/math/base/special/exp2`][@stdlib/math/base/special/exp2]</span><span class="delimiter">: </span><span class="description">base 2 exponential function.</span>
- <span class="package-name">[`@stdlib/math/base/special/log10`][@stdlib/math/base/special/log10]</span><span class="delimiter">: </span><span class="description">common logarithm (base ten).</span>

</section>

<!-- /.related -->

<section class="links">

[exponential-function]: https://en.wikipedia.org/wiki/Exponential_function

<!-- <related-links> -->

[@stdlib/math/base/special/exp]: https://.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/exp

[@stdlib/math/base/special/exp2]: https://.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/exp2

[@stdlib/math/base/special/log10]: https://.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/log10

<!-- </related-links> -->

</section>

<!-- /.links -->