Skip to content

feat: add math/base/special/atan2f #3338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 31 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a23c289
feat: basic files added
Neerajpathak07 Dec 5, 2024
2960d3a
feat: basic c files added
Neerajpathak07 Dec 5, 2024
12e33ae
feat: test added
Neerajpathak07 Dec 5, 2024
a0afa69
feat: docs added
Neerajpathak07 Dec 5, 2024
45d8ce5
feat: examples added
Neerajpathak07 Dec 5, 2024
0d8c569
feat: benchmark added
Neerajpathak07 Dec 5, 2024
3a1fe1b
feat: lib added
Neerajpathak07 Dec 5, 2024
54b5151
fix: test errors
Neerajpathak07 Dec 6, 2024
61bfb12
fix: lint coyright years
Neerajpathak07 Dec 6, 2024
b248ecd
fix: update manifest.json
Neerajpathak07 Dec 9, 2024
51e0deb
fix: benchmark errors
Neerajpathak07 Dec 9, 2024
19271d9
fix: addressing CI failures
Neerajpathak07 Dec 10, 2024
acd6d78
Merge branch 'develop' of https://github.com/Neerajpathak07/stdlib in…
Neerajpathak07 Jan 15, 2025
c4e6ad7
Merge branch 'stdlib-js:develop' into add-atan2f
Neerajpathak07 Jan 15, 2025
ecda47c
chore: clean up
Neerajpathak07 Jan 15, 2025
c5689f5
chore: update main.c
Neerajpathak07 Jan 15, 2025
ef2c8b9
fix: example error
Neerajpathak07 Jan 15, 2025
ee61759
fix: example error
Neerajpathak07 Jan 15, 2025
d26a02c
chore: update main.c
Neerajpathak07 Jan 15, 2025
ebd654e
fix: revert previous chnages
Neerajpathak07 Jan 15, 2025
e96841f
chore: update main.c
Neerajpathak07 Jan 15, 2025
4f4e4f4
fix: native test error
Neerajpathak07 Jan 16, 2025
17f6e7a
chore: update makefile
Neerajpathak07 Jan 20, 2025
2283e32
chore: update bench
Neerajpathak07 Jan 23, 2025
eaaad1e
chore: update fixtures
Neerajpathak07 Feb 11, 2025
93fbc17
chore: update benchmark
Neerajpathak07 Feb 23, 2025
f6611fd
chore: update benchmark
Neerajpathak07 Feb 23, 2025
c13285b
Merge branch 'add-atan2f' of https://github.com/Neerajpathak07/stdlib…
Neerajpathak07 Mar 13, 2025
a0fc498
chore: update fixtures
Neerajpathak07 Mar 13, 2025
82f1843
chore: minor changes
Neerajpathak07 Mar 14, 2025
eea9ec4
chore: lint module name
Neerajpathak07 Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/

# @license Apache-2.0
#
# Copyright (c) 2025 The Stdlib Authors.
Expand All @@ -16,14 +16,15 @@
# limitations under the License.
#/


# VARIABLES #

ifndef VERBOSE
QUIET := @
else
QUIET :=
endif

# Determine the OS:
# Determine the OS ([1][1], [2][2]).
#
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
# [2]: http://stackoverflow.com/a/27776822/2225624
Expand All @@ -36,6 +37,10 @@ ifneq (, $(findstring MSYS,$(OS)))
else
ifneq (, $(findstring CYGWIN,$(OS)))
OS := WINNT
else
ifneq (, $(findstring Windows_NT,$(OS)))
OS := WINNT
endif
endif
endif
endif
Expand All @@ -54,7 +59,7 @@ CFLAGS ?= \
-Wall \
-pedantic

# Determine whether to generate [position independent code][1]:
# Determine whether to generate position independent code ([1][1], [2][2]).
#
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
Expand All @@ -64,43 +69,77 @@ else
fPIC ?= -fPIC
endif

# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
INCLUDE ?=

# List of source files:
SOURCE_FILES ?=

# List of libraries (e.g., `-lopenblas -lpthread`):
LIBRARIES ?=

# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
LIBPATH ?=

# List of C targets:
c_targets := benchmark.out


# TARGETS #
# RULES #

# Default target.
#/
# Compiles source files.
#
# This target is the default target.

# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
# @param {string} [CFLAGS] - C compiler options
# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
# @param {string} [SOURCE_FILES] - list of source files
# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
#
# @example
# make
#
# @example
# make all
#/
all: $(c_targets)

.PHONY: all


# Compile C source.
#/
# Compiles C source files.
#
# This target compiles C source files.

# @private
# @param {string} CC - C compiler (e.g., `gcc`)
# @param {string} CFLAGS - C compiler options
# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
# @param {string} SOURCE_FILES - list of source files
# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
#/
$(c_targets): %.out: %.c
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm

$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)

# Run a benchmark.
#/
# Runs compiled benchmarks.
#
# This target runs a benchmark.

# @example
# make run
#/
run: $(c_targets)
$(QUIET) ./$<

.PHONY: run


# Perform clean-up.
#/
# Removes generated files.
#
# This target removes generated files.

# @example
# make clean
#/
clean:
$(QUIET) -rm -f *.o *.out

Expand Down
Loading