path
stringlengths
14
112
content
stringlengths
0
6.32M
size
int64
0
6.32M
max_lines
int64
1
100k
repo_name
stringclasses
2 values
autogenerated
bool
1 class
cosmopolitan/libc/linux/munmap.h
#ifndef COSMOPOLITAN_LIBC_LINUX_MUNMAP_H_ #define COSMOPOLITAN_LIBC_LINUX_MUNMAP_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxMunmap(void *addr, size_t size) { #ifdef __x86_64__ long rc; asm volatile("syscall" : "=a"(rc) : "0"(0xb), "D"(addr), "S"(size) ...
834
30
jart/cosmopolitan
false
cosmopolitan/libc/linux/write.h
#ifndef COSMOPOLITAN_LIBC_LINUX_WRITE_H_ #define COSMOPOLITAN_LIBC_LINUX_WRITE_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxWrite(long fd, const void *data, unsigned long size) { long rc; asm volatile("syscall" : "=a"(rc) : "0"(1), "D"(fd), "S"(data), "d"(size), ...
510
17
jart/cosmopolitan
false
cosmopolitan/libc/linux/read.h
#ifndef COSMOPOLITAN_LIBC_LINUX_READ_H_ #define COSMOPOLITAN_LIBC_LINUX_READ_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxRead(long fd, void *data, unsigned long size) { long rc; asm volatile("syscall" : "=a"(rc), "=m"(*(char(*)[size])data) : "0"(0), "D"(fd), "S"(dat...
484
16
jart/cosmopolitan
false
cosmopolitan/libc/linux/fstat.h
#ifndef COSMOPOLITAN_LIBC_LINUX_FSTAT_H_ #define COSMOPOLITAN_LIBC_LINUX_FSTAT_H_ #include "libc/calls/struct/stat.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxFstat(long fd, struct stat *st) { long rc; asm volatile("syscall" : "=a"(rc) : "0"(5), "D"(fd), "S"(st) ...
468
17
jart/cosmopolitan
false
cosmopolitan/libc/linux/futex.h
#ifndef COSMOPOLITAN_LIBC_LINUX_FUTEX_H_ #define COSMOPOLITAN_LIBC_LINUX_FUTEX_H_ #include "libc/calls/struct/timespec.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline int LinuxFutexWait(void *addr, int expect, struct timespec *timeout) { int ax; asm volatile("mov\t%5,%%r10\n\t" ...
833
28
jart/cosmopolitan
false
cosmopolitan/libc/linux/clone.h
#ifndef COSMOPOLITAN_LIBC_LINUX_CLONE_H_ #define COSMOPOLITAN_LIBC_LINUX_CLONE_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxClone(unsigned long flags, void* stack, int* parent_tid, int* child_tid, void* tls) { long rc; register int* child_tid_ asm("r10") = child_tid; ...
670
20
jart/cosmopolitan
false
cosmopolitan/libc/linux/mmap.h
#ifndef COSMOPOLITAN_LIBC_LINUX_MMAP_H_ #define COSMOPOLITAN_LIBC_LINUX_MMAP_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxMmap(void *addr, size_t size, long prot, long flags, long fd, long off) { #ifdef __x86_64__ long rc; register long flags_ asm("r10") = flags; regi...
1,278
39
jart/cosmopolitan
false
cosmopolitan/libc/linux/execve.h
#ifndef COSMOPOLITAN_LIBC_LINUX_EXECVE_H_ #define COSMOPOLITAN_LIBC_LINUX_EXECVE_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxExecve(const char *program, char *const argv[], char *const envp[]) { long rc; asm volatile("syscall" : "=a"(rc) ...
519
17
jart/cosmopolitan
false
cosmopolitan/libc/linux/open.h
#ifndef COSMOPOLITAN_LIBC_LINUX_OPEN_H_ #define COSMOPOLITAN_LIBC_LINUX_OPEN_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxOpen(const char *path, long flags, long mode) { long rc; asm volatile("syscall" : "=a"(rc) : "0"(2), "D"(path), "S"(flags), "d"(mode) ...
459
16
jart/cosmopolitan
false
cosmopolitan/libc/linux/close.h
#ifndef COSMOPOLITAN_LIBC_LINUX_CLOSE_H_ #define COSMOPOLITAN_LIBC_LINUX_CLOSE_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) forceinline long LinuxClose(long fd) { long rc; asm volatile("syscall" : "=a"(rc) : "0"(3), "D"(fd) : "rcx", "r11", "memory"); return rc; } #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #endi...
361
13
jart/cosmopolitan
false
cosmopolitan/libc/linux/linux.mk
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘ PKGS += LIBC_LINUX LIBC_LINUX_HDRS = $(filter %.h,$(LIBC_LINUX_FILES)) LIBC_LINUX_FILES := $(wildcard libc/linux/*) LI...
442
12
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cimagf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,918
24
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/tandf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
4,803
92
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/acosh.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,423
60
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/ilogbf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,303
64
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sqrtf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,187
148
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/horner_wrap.internal.h
#ifndef COSMOPOLITAN_LIBC_TINYMATH_HORNER_WRAP_INTERNAL_H_ #define COSMOPOLITAN_LIBC_TINYMATH_HORNER_WRAP_INTERNAL_H_ /* * Helper macros for Horner polynomial evaluation. * * Copyright (c) 2022-2023, Arm Limited. * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception */ // clang-format off #define HOR...
1,698
40
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sqrt_data.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,749
54
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/nextafter.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,528
70
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/j0.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
16,896
416
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/coshl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
7,466
158
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/powl.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
28,258
1,064
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/fminl.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,345
39
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/invtrigl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,471
104
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cproj.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,042
28
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/lgamma_r.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
13,317
322
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cpow.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
2,992
44
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/creall.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,930
24
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/ktanl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
8,516
186
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/feval.internal.h
#ifndef COSMOPOLITAN_LIBC_TINYMATH_FEVAL_INTERNAL_H_ #define COSMOPOLITAN_LIBC_TINYMATH_FEVAL_INTERNAL_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ static inline void fevalf(float x) { volatile float y = x; } static inline void feval(double x) { volatile double y = x; } static inline void feval...
497
21
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/logf_data.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,881
67
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sincosf_data.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
4,166
87
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/powf_data.internal.h
#ifndef COSMOPOLITAN_LIBC_TINYMATH_POWF_DATA_INTERNAL_H_ #define COSMOPOLITAN_LIBC_TINYMATH_POWF_DATA_INTERNAL_H_ #define POWF_LOG2_TABLE_BITS 4 #define POWF_LOG2_POLY_ORDER 5 #if TOINT_INTRINSICS #define POWF_SCALE_BITS EXP2F_TABLE_BITS #else #define POWF_SCALE_BITS 0 #endif #define POWF_SCALE ((double)(1 << POWF_SCA...
692
26
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/nearbyint.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,453
47
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/tanhf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,628
80
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/catanhl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,006
44
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cexp.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,685
121
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/rintl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,399
65
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cacoshl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,100
47
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/kcos.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,644
107
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/fdim.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,090
32
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/exp2l.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
23,677
663
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/catanf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,273
144
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cargf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,958
25
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/j1.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
16,390
403
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/casinhf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
2,986
45
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/ccosh.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
7,725
180
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/crealf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,918
24
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cargl.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,055
28
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/modf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,302
68
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/nearbyintl.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,245
40
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cprojf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,046
28
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/logf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
4,581
108
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/exp10l.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,545
63
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/asinf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
4,432
103
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/log1pf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
7,322
181
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/finitel.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,971
27
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sincosl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,813
92
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/casinh.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,011
47
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/exp10f.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,320
57
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/casinf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,114
53
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/randtest.c
/* clang-format off */ /* Apply various randomness tests to a stream of bytes by John Walker -- September 1996 http://www.fourmilab.ch/ */ #include "libc/math.h" #define FALSE 0 #define TRUE 1 #define log2of10 3.32192809488736234787 static int binary = FALSE; /* Treat input as a bitstream */...
4,712
185
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sqrt.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
7,967
227
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/fdimf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,999
28
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/fabsf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,046
32
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/log2.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
6,425
164
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/tanf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
4,634
100
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/atan.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
7,021
161
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/catan.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,584
152
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/atanh.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,488
71
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cosh.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,670
79
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/ktan.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
7,278
155
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/emod.h
#ifndef COSMOPOLITAN_LIBC_TINYMATH_EMOD_H_ #define COSMOPOLITAN_LIBC_TINYMATH_EMOD_H_ #include "libc/math.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) /** * Returns Euclidean floating-point division remainder. * * @return (𝑥 mod 𝑦) ∈ [0.,𝑦) * @see fmod() */ #define emod(x, y) \ ...
612
21
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/csqrtf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,751
120
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/__math_divzerof.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
2,749
35
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/frexp.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,270
63
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sin.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,411
128
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cexpf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,653
121
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/fmaf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
6,747
167
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/nexttowardf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,411
70
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/ctanhl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
2,868
41
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cbrtl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
6,333
167
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/asinhl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,755
114
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/floorf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,868
92
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/sqrtl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
8,275
296
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/atanhl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,508
70
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cabs.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,098
32
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/rintf.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,431
69
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cacosl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,044
46
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/cacos.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,102
47
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/internal.h
#ifndef COSMOPOLITAN_LIBC_TINYMATH_INTERNAL_H_ #define COSMOPOLITAN_LIBC_TINYMATH_INTERNAL_H_ #define WANT_ROUNDING 1 #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ #define issignalingf_inline(x) 0 #define issignaling_inline(x) 0 // clang-format off #define asuint(f) ((union{float _f; uint32_t _i;}){f...
2,276
84
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/scalblnf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,952
27
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/tan.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
5,159
120
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/conjf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,944
24
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/asinl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
4,822
113
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/trunc.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,790
87
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/ilogbl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,871
89
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/remainderf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,873
75
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/atanl.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
8,798
229
jart/cosmopolitan
false
cosmopolitan/libc/tinymath/tanh.c
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│ │vi: set et ft=c ts=8 tw=8 fenc=utf-8 :vi│ ╚─────────────────────────────────────────────────â”...
3,689
79
jart/cosmopolitan
false