summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-06-07Move hi/lo multiplication and addition routines to util.S. Gilles
2019-06-07Merge remote-tracking branch 'origin/master' into pown-implS. Gilles
2019-06-07Remove debugging information.S. Gilles
2019-06-07Rewrite log-overkill.myrS. Gilles
Instead of performing the arbitrary-precision calculation, we can instead generalize [Tan90] slightly to use multiple levels of tables. This isn't quite as wasteful.
2019-05-21Correct sign-handling for pown special caseS. Gilles
2019-05-11Fix Remez algorithm.S. Gilles
2019-05-10Allow exact case of mkbigint(2^32)S. Gilles
2019-05-02Replace costly sum with slightly faster sums in log-overkill.S. Gilles
This still doesn't make the function fast, but it's less embarassingly slow now.
2019-05-01Typo in log-overkill explanation.S. Gilles
2019-05-01Implement rootn.S. Gilles
2019-05-01Add missing reference for pown and rootn.S. Gilles
2019-05-01Add pown function.S. Gilles
2019-05-01Test the slow2sum function.S. Gilles
The singular piece of test data is the tuple that caused me to spend far too long realizing that fast2sum is not always appropriate.
2019-05-01Add a log function which returns far too much precision.S. Gilles
This makes accurately computing pown and powr easier.
2019-05-01Add 2sum in math utilS. Gilles
Fast2sum is only for when magnitudes of the arguments are known. 2sum (called "slow2sum") avoids this, at the cost of speed. It ends up being necessary in the forthcoming log-overkill function.
2019-05-01Add fltXXfromuintXX to ancillary math script.S. Gilles
2019-04-29Print "NaN" and "Inf" for floating-point NaNs and infinites.S. Gilles
2019-03-21Commit bio.readtermOri Bernstein
2019-03-21bio.readto and EOFCarlin Bingham
Hi, When using bio.readto I often want to be able to tell if the delimeter was found, or if the file was truncated, but there doesn't appear to be a way to tell if readto stopped searching because it found what it was looking for or if it reached EOF, other than to do another read. A simple solution to this would be a new function that reads to and includes the delimeter in the returned slice if it was found, which can be used intead when you care. I've tentatively included a patch for this. Is this something that would be wanted? Is there a better solution? Or a better name? -- Carlin NB. I've stolen the `Keep tag that was already there but apparently never used. Not sure if it was intended for a higher purpose. >From c230b380fbf0e7ba2c24aae332e4ce8016843d66 Mon Sep 17 00:00:00 2001 From: Carlin Bingham <cb@viennan.net> Date: Sat, 16 Mar 2019 10:20:23 +1300 Subject: [PATCH] Add bio.readtoinc - read to including delimiter X-Spam-Status: No, hits=0.000000 required=0.900000 Similar to bio.readto except it includes the delimeter in the returned slice if it was found, making the absence of the delimiter indicate EOF
2019-03-16Add synchronization to xset.iriri
Unfortunately, this is necessary to achieve sequential consistency.
2019-03-14Add explicit abi conversions for syscall args.Ori Bernstein
Sure, the types happen to work, but consistency is nice.
2019-03-14Fix use-after-free in futex-based semaphore implementations.iriri
The current implementation of `sem_post` first increments the value of the semaphore and then checks the waiter count to see if it must call `ftxwake`. However, it is possible for `sem_wait` to return at any time after the value has been incremented, meaning that the memory this check looks at might already be deallocated. Happily, it turns out the OS X futex operations actually take a 32 bit value which greatly simplifies things.
2019-03-13readdelim: don't leak memory if there's an errorCarlin Bingham
2019-03-13Fix bio.readtoCarlin Bingham
Don't change rstart on each iteration as that prevents it being able to return characters at the start of the buffer if the delim is found, and only read characters from the buffer that were actually checked
2019-02-28Fix type substitution in sizeof.Ori Bernstein
2019-02-26Hook in __fini__ on 9front.Ori Bernstein
2019-02-19Handle (-1) + (1) and (-3) - (-2) with bigintsS. Gilles
2019-02-19Allow bigparse to handle negative numbersS. Gilles
2019-02-19Convert bigint tests to use testrS. Gilles
2019-01-29Remove pointless call overhead and casting.Ori Bernstein
2019-01-29Align slices correctly in vaenter.Ori Bernstein
2019-01-27Add commonly used constants.Ori Bernstein
2019-01-27Fix formatting.Ori Bernstein
2019-01-20Fix package name.Ori Bernstein
2019-01-19Fix curve25519.Ori Bernstein
2019-01-14Merge branch 'pathabs' of https://github.com/typeless/mcOri Bernstein
2019-01-12Fix thread spawning on OSX 10.14Ori Bernstein
2019-01-12Keep partial indents better.Ori Bernstein
Align to what I want it to align to.
2019-01-12Improve manpages (thanks BurnZeZ)Ori Bernstein
2019-01-07Correctly strip manpage names on Plan 9.Ori Bernstein
2019-01-07Change indexed array literal syntax.Ori Bernstein
2019-01-06Add start of x25519 code.Ori Bernstein
Not yet tested, so not enabled.
2019-01-05Add pathabsMura Li
2018-12-26Comment.Ori Bernstein
2018-12-26Implement `std.bygrapheme`.Ori Bernstein
2018-11-26Add missing const to sys pkg.Ori Bernstein
2018-11-16Add some negative tests.Ori Bernstein
2018-11-16Add strfind tests.Ori Bernstein
2018-11-16Fix tests.Ori Bernstein
Missing dep.
2018-11-12Simplify strfind.Ori Bernstein
Stop trying to be so damn general.