time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

notes.md (953B)


      1 ## bc versions
      2 https://git.gavinhoward.com/gavin/bc/src/branch/master
      3 https://www.gnu.org/software/bc/manual/html_mono/bc.html
      4 https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/bc.html
      5 
      6 ## gh-bc
      7 
      8 To build
      9 ./configure.sh -O3
     10 make
     11 sudo cp bin/bc /usr/bin/ghbc
     12 
     13 Man, just feels nicer.
     14 rand()
     15 maxrand()
     16 
     17 ghbc -l: include math functions, like log, sin 
     18 
     19 ## gnu bc
     20 
     21 --standard: Process exactly the POSIX bc language.
     22 Could define my own rng, and use arrays to do the seed thing
     23 
     24 ## Usage
     25 
     26 Numbers are arbitrary precision numbers
     27 
     28 length ( expression )
     29 scale (expression)
     30 scale=100
     31 define t(x) {
     32   return(2);
     33 }
     34 
     35 Apparently posix bc only has one-letter functions, lol
     36 Extensions needed: multi-letter functions 
     37 
     38 ## Decisions, decisions
     39 
     40 Maybe target gh-bc, and then see about making it POSIX complicant later?
     41 
     42 Decide between GH's bc, POSIX bc, and gnu bc
     43 - Start with POSIX for now 
     44 - Can't do POSIX, one letter functions are too annoying