Skip to content

Commit ad3eecc

Browse files
committed
feat: add c implementation of heaviside
--- 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: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 86d0252 commit ad3eecc

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

lib/node_modules/@stdlib/math/base/special/heaviside/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2025 The Stdlib Authors.
5+
Copyright (c) 2018 The Stdlib Authors.
66
77
Licensed under the Apache License, Version 2.0 (the "License");
88
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# Heaviside Function
2222

23-
> Evaluate the [Heaviside function][heaviside-function].
23+
> Evaluates the [Heaviside function][heaviside-function].
2424
2525
<section class="intro">
2626

@@ -190,9 +190,9 @@ logEachMap( 'H(%0.4f) = %0.4f', x, heaviside );
190190
#include "stdlib/math/base/special/heaviside.h"
191191
```
192192

193-
#### stdlib_base_heaviside( x )
193+
#### stdlib_base_heaviside( x, continuity )
194194

195-
Evaluate the [Heaviside function][heaviside-function].
195+
Evaluates the [Heaviside function][heaviside-function].
196196

197197
```c
198198
double out = stdlib_base_heaviside( 0.0, 0 );

lib/node_modules/@stdlib/math/base/special/heaviside/benchmark/c/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#/
22
# @license Apache-2.0
33
#
4-
# Copyright (c) 2025 The Stdlib Authors.
4+
# Copyright (c) 2018 The Stdlib Authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

lib/node_modules/@stdlib/math/base/special/heaviside/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2025 The Stdlib Authors.
4+
* Copyright (c) 2018 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.

lib/node_modules/@stdlib/math/base/special/heaviside/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import heaviside = require( './index' );
2323

2424
// The function returns a number...
2525
{
26-
heaviside( 3.141592653589793, 'half-maximum' ); // $ExpectType number
26+
heaviside( 3.141592653589793 ); // $ExpectType number
2727
heaviside( 0, 'half-maximum' ); // $ExpectType number
2828
heaviside( 0, 'left-continuous' ); // $ExpectType number
2929
heaviside( 0, 'right-continuous' ); // $ExpectType number

lib/node_modules/@stdlib/math/base/special/heaviside/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
/**
2323
* Evaluates the Heaviside function.
2424
*
25-
* @param x input value
26-
* @param continuity continuity option
27-
* @return function value
25+
* @param x input value
26+
* @param continuity continuity option
27+
* @return function value
2828
*
2929
* @example
3030
* double v = stdlib_base_heaviside( 3.14, 0 );
@@ -55,7 +55,7 @@
5555
* // returns NaN
5656
*/
5757
double stdlib_base_heaviside( const double x, int continuity ) {
58-
if ( stdlib_base_is_nan( x )) {
58+
if ( stdlib_base_is_nan( x ) ) {
5959
return 0.0/0.0;
6060
}
6161
if ( x > 0.0 ) {

0 commit comments

Comments
 (0)