Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

libzahl - big integer library

Name: Anonymous 2016-03-05 22:05

http://git.suckless.org/libzahl/tree/
The rationale for its creation can be found on the README file.
What do you think?

Name: Anonymous 2017-01-05 13:42

https://github.com/suiginsoft/hebimath/blob/master/TODO
https://github.com/suiginsoft/hebimath/blob/master/config.mk

TODO says ``planned for version 0.6'' but config.mk says hebimath 0.6 has already been released.

Name: Anonymous 2017-01-05 13:46

.travis.yml and sonar-project.properties pollute the repo a little, shouldn't put them on .gitignore?

Name: suigin 2017-01-05 15:41

>>115
Maybe later, the benchmarks aren't a high priority, I've been doing manual performance regression testing periodically, I'm in a good state.

>>120
To a degree, yes, it's worth it in this case. That change does make things somewhat simpler from the library maintainer's standpoint, it removes the cognitive overhead of having to think about making sure I'm not fucking something up with the intptr_t -> int casting. Leaving it as is makes it easier for someone to pass in a malformed allocid, and complicates the error checking. As far as losing the type-checking for users, it's not that big of a deal, just use the typedef and you'll be okay.

>>122
Yes, they do, but they're needed for Travis CI (or pretty much any public continuous integration service). I could put them in a different branch, but then I'm not getting as continuous of integrations if I always have to merge from master into another branch or vice versa.

Name: suigin 2017-01-05 15:46

>>121
Version 0.6 only comes out once it's been tagged.

Name: suigin 2017-01-05 15:48

>>122,123
Actually, I can probably roll sonar-project.properties into the .travis.yml file, just pass those properties in as arguments to the sonar-scanner. I'll do that later, thanks for the critique.

Name: Anonymous 2017-01-08 0:10

I ran hebimath through PVS-Studio.

hebimath/check/p/pcmp.c 33 err V512 A call of the 'memset' function will lead to overflow of the buffer 'y'.
hebimath/check/p/pnorm.c 30 err V512 A call of the 'memset' function will lead to a buffer overflow.
hebimath/check/p/negnot.c 22 warn V756 The 'i' counter is not used inside a nested loop. Consider inspecting usage of 'n' counter.

Name: Anonymous 2017-01-08 0:12

I ran libzahl through PVS-Studio.

libzahl/src/zrand.c 195 err V654 The condition of loop is always false.
libzahl/src/zrand.c 206 err V654 The condition of loop is always false.
libzahl/src/zsub.c 105 warn V764 Possible incorrect order of arguments passed to 'libzahl_zsub_unsigned' function: 'c' and 'b'.
libzahl/src/allocator.c 24 warn V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'a->chars' is lost. Consider assigning realloc() to a temporary pointer.

Name: Anonymous 2017-01-08 0:57

>>124
tag! you're it!

Name: suigin 2017-01-08 10:55

>>126
Pretty good when it's only my unit tests failing. I think they're false positives in my case.

Name: Anonymous 2017-01-10 0:44

>>103
It may actually be a bug on hebimath.
I found a similar issue on GHC and it seems to be a bug on GHC.
https://ghc.haskell.org/trac/ghc/ticket/9007

Name: suigin 2017-01-10 10:22

>>130
I'll try installing Alpine on a spare RPI and look into it more deeply over the next couple of days.

Name: suigin 2017-01-10 10:23

>>131
And I'll try Alpine x86-64 in a VM, as it may be specific to that hardware.

Name: Anonymous 2017-01-10 19:22

πŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡Έ
I claim these dubz in the name of the United States of America
πŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡ΈπŸ‡ΊπŸ‡Έ

Name: Anonymous 2017-01-12 13:43

>>131
I did some investigation for you.
If I comment this then it compiles fine.

================================================================================
check/p/pmove.c
hebi_pmove(y+GUARD, x+GUARD, k);
================================================================================
check/z/getset.c
assert(hebi_zgetstr(buf, sizeof(buf), a, 10) < sizeof(buf));
assert(hebi_zgetstr(buf, sizeof(buf), a, 10) < sizeof(buf));
assert(hebi_zgetstr(buf, sizeof(buf), a, 10) < sizeof(buf));
================================================================================
check/z/shift.c
zpermutation(check_iter, check_max_perm, 1, a);
hebi_zshl(r, a, b);
zcheckbc(r, "%Z*(2^%zu)", a, b);
hebi_zshl(q, q, b);
================================================================================
check/z/zcmp.c
bcwrite(cmp_script);
zcheckbinop(zcmp_wrapper, "cmp(%Z, %Z)", 0);
================================================================================
check/z/zcmpmag.c
bcwrite(cmpmag_script);
zcheckbinop(zcmpmag_wrapper, "cmpmag(%Z, %Z)", 0);
================================================================================
check/z/zcmpi.c
bcwrite(cmp_script);
zcheckbinopi64(zcmpi_wrapper, "cmp(%Z, %lld)", 0);
================================================================================
check/z/zcmpu.c
bcwrite(cmp_script);
zcheckbinopu64(zcmpu_wrapper, "cmp(%Z, %llu)", 0);
================================================================================
check/z/zabs.c
bcwrite(abs_script);
zcheckunaryop(hebi_zabs, "abs(%Z)", 0);
================================================================================
check/z/zneg.c
zcheckunaryop(hebi_zneg, "-(%Z)", 0);
================================================================================
check/z/zadd.c
zcheckbinop(hebi_zadd, "%Z + %Z", 0);
================================================================================
check/z/zaddmag.c
bcwrite(abs_script);
zcheckbinop(hebi_zaddmag, "abs(%Z) + abs(%Z)", 0);
================================================================================
check/z/zaddi.c
zcheckbinopi64(hebi_zaddi, "%Z + %lld", 0);
================================================================================
check/z/zaddu.c
zcheckbinopu64(hebi_zaddu, "%Z + %llu", 0);
================================================================================
check/z/zsub.c
zcheckbinop(hebi_zsub, "%Z - %Z", 0);
================================================================================
check/z/zsubmag.c
bcwrite(abs_script);
zcheckbinop(hebi_zsubmag, "abs(%Z) - abs(%Z)", 0);
================================================================================
check/z/zsubi.c
zcheckbinopi64(hebi_zsubi, "%Z - %lld", 0);
================================================================================
check/z/zsubu.c
zcheckbinopu64(hebi_zsubu, "%Z - %llu", 0);
================================================================================
check/z/zmul.c
zcheckbinop(hebi_zmul, "%Z * %Z", 0);
================================================================================
check/z/zmuli.c
zcheckbinopi64(hebi_zmuli, "%Z * %lld", 0);
================================================================================
check/z/zmulu.c
zcheckbinopu64(hebi_zmulu, "%Z * %llu", 0);
================================================================================
check/z/zdiv.c
zcheckbinop(hebi_zdiv, "%Z / %Z", RHS_NONZERO);
================================================================================
check/z/zdivi.c
hebi_zdivi(a, a, 0);
hebi_zdivi(a, a, 0);
zcheckbinopi64(hebi_zdivi, "%Z / %lld", RHS_NONZERO);
================================================================================
check/z/zdivu.c
hebi_zdivu(a, a, 0);
hebi_zdivu(a, a, 0);
zcheckbinopu64(hebi_zdivu, "%Z / %llu", RHS_NONZERO);
================================================================================
check/z/zdivrem.c
hebi_zdivrem(q, r, a, b);
hebi_zdivrem(q, r, a, b);
hebi_zdivrem(q, r, a, b);
zcheckbc(q, "%Z / %Z", a, b);
zcheckbc(r, "%Z %% %Z", a, b);
hebi_zdivrem(q, r, a, b);
zcheckbc(q, "%Z / %Z", a, b);
zcheckbc(r, "%Z %% %Z", a, b);
hebi_zdivrem(q, r, a, b);
zcheckbc(q, "%Z / %Z", a, b);
zcheckbc(r, "%Z %% %Z", a, b);
================================================================================
check/z/zrem.c
zcheckbinop(hebi_zrem, "%Z %% %Z", RHS_NONZERO);
================================================================================
check/z/zremi.c
(void)hebi_zremi(a, 0);
(void)hebi_zremi(a, 0);
zcheckbinopi64(zremi, "%Z %% %lld", RHS_NONZERO);
================================================================================
check/z/zremu.c
(void)hebi_zremu(a, 0);
(void)hebi_zremu(a, 0);
zcheckbinopu64(zremu, "%Z %% %llu", RHS_NONZERO);
================================================================================
check/z/zsqr.c
bcwrite(sqr_script);
zcheckunaryop(hebi_zsqr, "sqr(%Z)", 0);
================================================================================
check/z/znot.c
bcwrite(and_script);
zcheckunaryop(hebi_znot, "not(%Z)", 0);
================================================================================
check/z/zand.c
bcwrite(and_script);
zcheckbinop(hebi_zand, "and(%Z, %Z)", 0);
================================================================================
check/z/zor.c
bcwrite(or_script);
zcheckbinop(hebi_zor, "or(%Z, %Z)", 0);
================================================================================
check/z/zxor.c
bcwrite(xor_script);
zcheckbinop(hebi_zxor, "xor(%Z, %Z)", 0);
================================================================================

Name: Anonymous 2017-01-12 15:45

Name: Anonymous 2017-01-12 16:43

🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸
🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍
🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸
🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍
🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸
🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍
🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸
🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍
🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸
🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍🐸🐍

Name: Anonymous 2017-01-13 4:05

arbitrariae preaecisione arithmeticae bybliotheca

I'm not sure that's valid Latin.
You should check it with a proficient speaker.
Revive /lang/, admin bastard!

Name: Anonymous 2017-01-28 13:10

suigin could be interested in this complex math Open Issue on musl.
http://wiki.musl-libc.org/wiki/Open_Issues#Complex_math

Name: Anonymous 2017-01-28 21:43

>>81
Broke my wrist 2 months ago
Did you get paid during the off duty?
I'm thinking about breaking my finger.

Name: Anonymous 2020-04-02 19:28

I miss sugin

Name: Anonymous 2020-04-02 19:29

e

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List