{"id":23092536,"url":"https://github.com/raresracsan/mathlib-c","last_synced_at":"2026-05-18T11:03:10.402Z","repository":{"id":251026484,"uuid":"832056323","full_name":"RaresRacsan/mathlib-C","owner":"RaresRacsan","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-31T08:59:17.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T02:32:14.582Z","etag":null,"topics":["assembly","assembly-x86","c","c-library","libraries"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RaresRacsan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T09:10:08.000Z","updated_at":"2024-10-31T13:07:09.000Z","dependencies_parsed_at":"2024-07-31T11:31:41.264Z","dependency_job_id":"1aac2d54-5544-48f0-9d50-81c15452e1e2","html_url":"https://github.com/RaresRacsan/mathlib-C","commit_stats":null,"previous_names":["raresracsan/mathlib-c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RaresRacsan/mathlib-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresRacsan%2Fmathlib-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresRacsan%2Fmathlib-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresRacsan%2Fmathlib-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresRacsan%2Fmathlib-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaresRacsan","download_url":"https://codeload.github.com/RaresRacsan/mathlib-C/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaresRacsan%2Fmathlib-C/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33175835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","assembly-x86","c","c-library","libraries"],"created_at":"2024-12-16T21:34:25.628Z","updated_at":"2026-05-18T11:03:10.366Z","avatar_url":"https://github.com/RaresRacsan.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assembly Math Functions for x64 Windows\nThis repository contains assembly code implementations of basic Math functions for x64 Windows. The functions are written in NASM (Netwide Assembler) and are designed to be used as part of a larger application or linked into other projects.\n\n## Functions\n\n### Exponential and logaritmic functions\n\n1. **exp**\n    ```assembly\n    double _exp(double a);\n    ```\n    Returns the base-e exponential function of x, which is e raised to the power x: e^x.\n\n2. **exp2**\n    ```assembly\n    int _exp2(int a);\n    ```\n    Returns the base-2 exponential function of x, which is 2 raised to the power x: 2x.\n\n3. **expm1**\n    ```assembly\n    double _expm1(double a);\n    ```\n    Returns e raised to the power x minus one: e^x-1.\n\n4. **log**\n    ```assembly\n    double _log(double a);\n    ```\n    Returns the natural logarithm of x.\n   \n5. **log10**\n    ```assembly\n    double _log10(double a);\n    ```\n    Returns the common (base-10) logarithm of x.\n\n6. **log2**\n    ```assembly\n    double _log2(double a);\n    ```\n    Returns the binary (base-2) logarithm of x.\n\n### Power functions\n\n1. **pow**\n    ```assembly\n    int _pow(int a, int b);\n    ```\n    Returns base raised to the power exponent.\n\n2. **sqrt**\n    ```assembly\n    int _sqrt(int a);\n    ```\n    Returns the square root of x.\n\n3. **cbrt**\n    ```assembly\n    int _cbrt(int a);\n    ```\n    Returns the cubic root of x.\n\n### Trigonometric functions\n1. **cos_function**\n    ```assembly\n    double cos_function(double a);\n    ```\n    Computes the cosine of a double-precision floating-point number.\n\n2. **sin_function**\n    ```assembly\n    double sin_function(double a);\n    ```\n    Computes the sine of a double-precision floating-point number.\n\n3. **tan_function**\n    ```assembly\n    double sin_function(double a);\n    ```\n    Computes the sine of a double-precision floating-point number.\n\n### Comparison functions\n1. **is_greater**\n    ```assembly\n    int is_greater(int a, int b);\n    ```\n    Returns 1 if the first integer is greater than the second, otherwise returns 0.\n\n2. **is_greaterequal**\n    ```assembly\n    int is_greaterequal(int a, int b);\n    ```\n    Returns 1 if the first integer is greater than or equal to the second, otherwise returns 0.\n\n3. **is_less**\n    ```assembly\n    int is_less(int a, int b);\n    ```\n    Returns 1 if the first integer is less than the second, otherwise returns 0.\n\n4. **is_lessequal**\n    ```assembly\n    int is_lessequal(int a, int b);\n    ```\n    Returns 1 if the first integer is less than or equal to the second, otherwise returns 0.\n\n5. **is_lessgreater**\n    ```assembly\n    int is_lessgreater(int a, int b);\n    ```\n    Returns -1 if the first integer is less than the second, 0 if they are equal, and 1 if the first integer is greater than the second.\n\n### Minimum, maximum, difference functions\n\n1. **fmax**\n    ```assembly\n    double fmax(double a, double b);\n    ```\n    Returns the maximum of a and b.\n\n2. **fmin**\n    ```assembly\n    double fmin(double a, double b);\n    ```\n    Returns the minimum of a and b.\n\n3. **fdim**\n    ```assembly\n    double fdim(double a, double b);\n    ```\n    Returns the positive difference between x and y.\n\n### Other functions\n\n1. **fabs**\n    ```assembly\n    double fabs(double a);\n    ```\n    Returns the absolute value of x: |x|.\n\n2. **abs**\n    ```assembly\n    int _abs(int a);\n    ```\n    Returns the absolute value of x: |x|.\n\n3. **fma**\n    ```assembly\n    double fma(double a, double b, double c);\n    ```\n    Returns x*y+z.\n\n## Detailed compilation steps\n1. Assemble the NASM code:\n```sh\nnasm -f win64 math.asm -o math.o\n```\n2. Compile the C code:\n```sh\ngcc -c main.c -o main.o\n```\n3. Link the object files and create the executable:\n```sh\ngcc main.o math.o -o main.exe\n```\n4. Run the executable:\n```sh\n./main.exe\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraresracsan%2Fmathlib-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraresracsan%2Fmathlib-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraresracsan%2Fmathlib-c/lists"}