{"id":13408812,"url":"https://github.com/bgkillas/kalc","last_synced_at":"2025-03-14T13:32:05.082Z","repository":{"id":161333423,"uuid":"636052717","full_name":"bgkillas/kalc","owner":"bgkillas","description":"a complex numbers, 2d/3d graphing, arbitrary precision, vector/matrix, cli calculator with real-time output and support for units","archived":false,"fork":false,"pushed_at":"2024-09-26T11:45:09.000Z","size":2689,"stargazers_count":186,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-26T11:48:30.781Z","etag":null,"topics":["arbitrary-precision","calculator","complex-numbers","graphing-calculator","rust","vector-calculator"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bgkillas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-05-04T03:02:54.000Z","updated_at":"2024-09-25T15:15:41.000Z","dependencies_parsed_at":"2023-12-22T12:50:35.754Z","dependency_job_id":"50c0c923-5f18-4c20-bceb-26e83794ad97","html_url":"https://github.com/bgkillas/kalc","commit_stats":null,"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgkillas%2Fkalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgkillas%2Fkalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgkillas%2Fkalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgkillas%2Fkalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgkillas","download_url":"https://codeload.github.com/bgkillas/kalc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584466,"owners_count":20314766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["arbitrary-precision","calculator","complex-numbers","graphing-calculator","rust","vector-calculator"],"created_at":"2024-07-30T20:00:55.430Z","updated_at":"2025-03-14T13:32:05.070Z","avatar_url":"https://github.com/bgkillas.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"calc\"\u003e\u003c/a\u003eCalculators"],"sub_categories":[],"readme":"# kalc\n\n[![crates.io](https://img.shields.io/crates/v/kalc.svg)](https://crates.io/crates/kalc) [![AUR](https://img.shields.io/aur/version/kalc.svg)](https://aur.archlinux.org/packages/kalc/)\n\n![img.png](img.png)\n\nhistory file is stored in [config_dir](https://docs.rs/dirs/latest/dirs/fn.config_dir.html)/kalc/kalc.history\n\nconfig file is stored in [config_dir](https://docs.rs/dirs/latest/dirs/fn.config_dir.html)/kalc/kalc.config example in\nrepo\n\nyou can set permanent variables and functions in the\nfile [config_dir](https://docs.rs/dirs/latest/dirs/fn.config_dir.html)/kalc/kalc.vars example in repo, also contains\nmore advanced example usage\n\nconfig defaults listed in kalc.config\n\n# install instructions\n\n### linux\n\nuse aur or run\n```cargo install kalc```\n\n### windows\n\ndownload kalc.exe from https://github.com/bgkillas/kalc/releases/latest\n\nneeds a modern terminal like 'windows terminal' or alacritty, alacritty has better latency seemingly\n\nfor graphing install gnuplot via winget or [sourceforge](https://sourceforge.net/projects/gnuplot/files/gnuplot/)\n\n### macos\n\ninstall developer tools via ```xcode-select --install```\n\n```cargo install kalc```\n\ninstall gnuplot via ```brew install gnuplot```\n\nmay need to run kalc from ```kalc 2\u003e /dev/null``` for gnuplot not to output error messages\n\n# build instructions\n\nif build fails due to gmp-mpfr-sys try changing the line\n`features = [\"force-cross\"]`\nto\n`features = [\"use-system-libs\"]`\nat the end of cargo.toml\n\n### linux\n\ndependencys are: rust\u003e=1.79.0, diffutils, gcc, m4, make\n\n```\ngit clone https://github.com/bgkillas/kalc\ncd kalc\ncargo build --release\n./target/release/kalc\n```\n\n### windows\n\nhave cargo and the toolchain ```stable-x86_64-pc-windows-gnu``` installed\n\nas per [gmp-mpfr-sys](https://docs.rs/gmp-mpfr-sys/latest/gmp_mpfr_sys/index.html#building-on-windows)\n\ninstall MSYS2 using the [installer](https://www.msys2.org/)\n\nlaunch MSYS2 MinGW and run\n\n```\npacman -Syu pacman-mirrors\npacman -S git diffutils m4 make mingw-w64-x86_64-gcc\ngit clone https://github.com/bgkillas/kalc\ncd kalc\nmkdir /mnt\nmount C: /mnt\n```\n\nif cargo is locally installed\n\n```\n/mnt/Users/$USER/.cargo/bin/cargo build --release\n./target/release/kalc.exe\n```\n\nif cargo is globally installed\n\n```\ncargo build --release\n./target/release/kalc.exe\n```\n\nthen move kalc.exe wherever you want in /mnt (your C drive)\n\n### macos\n\nas per [gmp-mpfr-sys](https://docs.rs/gmp-mpfr-sys/latest/gmp_mpfr_sys/index.html#building-on-macos)\n\nassure the path upto your build path contains no spaces\n\ninstall developer tools via ```xcode-select --install```\n\n```\ngit clone https://github.com/bgkillas/kalc\ncd kalc\ncargo build --release\n./target/release/kalc\n```\n\n# usage\n\n```\nUsage: kalc [FLAGS] equation_1 equation_2 equation_3...\nFLAGS: --help (this message)\n--help {thing} to get more detail on a function/option/feature, --help help to list all \"things\"\n--interactive/-i allows interaction after finishing the equations given\n--units toggles units\n--notation=e/E/s/n defines what kind of notation you should use,(e) 3e2,(E) 3E2,(s) 3*10^2,(n) 300\n--graph=normal/domain/domain_alt/depth/flat/none changes how a function is graphed, domain/depth/flat relate to complex graphs\n--label=[x],[y],[z] sets the labels for the graphs x/y/z axis\n--angle=deg/rad/grad sets your angletype\n--2d=[num] number of points to graph in 2D, 2d=-1 for integer placements\n--3d=[x],[y] number of points to graph in 3D, 3d=-1 for integer placements\n--xr=[min],[max] x range for graphing\n--yr=[min],[max] y range for graphing\n--zr=[min],[max] z range for graphing\n--range=[num] sets all ranges to [-num],[num]\n--vxr=[min],[max] x range for graphing, graph view override, useful for parametric\n--vyr=[min],[max] y range for graphing, graph view override, useful for parametric\n--vzr=[min],[max] z range for graphing, graph view override, useful for parametric\n--vrange=[num] sets all ranges to [-num],[num], graph view override, useful for parametric\n--point [char] point style for graphing\n--base=[input],[output] sets the numbers base from 2 to 36\n--ticks=[num](,[num](,[num])) sets amount of ticks, optionally set different x/y/z ticks, -2 will be auto, -1 will be at every whole number, 0 will be none\n--onaxis toggles showing the ticks on the x/y/z axis on by default for 2d, off by default for 3d\n--prompt toggles the prompt\n--color=true/false/auto toggles color output, toggled by default when running from arguments\n--comma toggles comma seperation\n--graph toggles graphing\n--vars disables default variables and kalc.vars\n--default sets to default settings and ignores kalc.vars\n--line=true/false/auto toggles line graphing\n--rt toggles real time printing\n--polar toggles displaying polar vectors\n--frac toggles fraction display\n--prec=[num] sets the output precision(default 512)\n--graphprec=[num] sets the graph precision(default 64)\n--deci=[num] sets how many decimals to display, -1 for length of terminal, -2 for maximum decimal places, may need to up precision for more decimals\n--multi toggles multi line display for matrixes\n--tabbed toggles tabbed display for matrixes\n--surface displays a colored surface(based on z value) for 3d graphing, only supports 1 graph\n--scalegraph scales the y part of a 2d graph to the users screen size, setting --windowsize=x,y makes the ratio more accurate\n--saveto=[file] saves the graph as a png to the given file, --windowsize=x,y for resolution\n--siunits toggles keeping stuff in si units, a newton will show as 'm s^-2 kg' instead of 'N'\n--keepzeros dont remove trailing zeros\n--progress shows progress on graph\n--default_units=unit1,unit2... sets the default single dimensional unit\n\n- flags can be executed in runtime just without the dashes\n- '~' will find the var value which makes the left side and right side equal each other, via newtons method starting at 0\n- '~~' will find the var value which makes the left side and right side equal each other, via newtons method starting at -2/0/2\n- any function with ' appeneded to the name will be converted like f'(x) goes to slope(t,f(t),x)\n- any function with ` appeneded to the name will be converted like f`(x) goes to area(t,f(t),0,x)\n- \"colors=\" to see color settings\n- \"exit\" to exit the program\n- \"clear\" to clear the screen\n- \"history [arg]\" to see the history, arg searches for the arg it if specified\n- \"vars\" to list all variables\n- \"option/var;function\" to set a temporal option/var, example: \"a=45;angle=deg;sin(a)\" = sqrt(2)/2\n- \"f(x)=var:function\" to set a temporal var when defining function, example: \"f(x)=a=2:ax\" = f(x)=2x\n- \"_\" or \"ans\" or \"ANS\" to use the previous answer\n- \"a={expr}\" to define a variable\n- \"f(x)=...\" to define a function\n- \"f(x,y,z...)=...\" to define a multi variable function\n- \"...=\" display parsed input, show values of stuff like xr/deci/prec etc\n- \"f...=null\" to delete a function or variable\n- \"{x,y,z...}\" to define a cartesian vector\n- \"[r,θ,φ]\" to define a polar vector (same as car{r,θ,φ})\n- \"f(x)#g(x)\" to graph multiple things\n- \"{vec}#\" to graph a vector\n- \"{mat}#\" to graph a matrix\n- \"number#\" to graph a complex number\n- \"[f(x),x]\" to graph a polar graph of f(x)\n- \"{x,y}\" to graph a parametric equation, example: {cos(x),sin(x)} unit circle, {f(x)cos(x),f(x)sin(x)} for polar graph\n- \"{x,y,z}\" to graph a parametric equation in 3d, example: {cos(x),sin(x),x} helix, {sin(x)cos(y),sin(x)sin(y),cos(x)} sphere\n- \"{{a,b,c},{d,e,f},{g,h,i}}\" to define a 3x3 matrix\n- \"rnd\" to generate a random number\n- \"epoch\" to get time in seconds since unix epoch\n- Alt+Enter will not print output while still graphing/defining variables\n- \"help {thing}\" to get more detail on a function/option/feature\n- \"help help\" to list all things to query\n\nOrder of Operations:\n- user defined functions\n- functions, !x, x!, x!!, |x|\n- % (modulus), .. (a..b creates lists of integers from a to b)\n- ^/** (exponentiation), // (a//b is a root b), ^^ (tetration), computed from right to left\n- × internal multiplication for units and negitive signs\n- * (multiplication), / (division)\n- + (addition), - (subtraction), +-/± (creates a list of the calculation if plus and the calculation if minus)\n- to/-\u003e (unit conversions, ie 2m-\u003eyd=2.2, leaves unitless if perfect conversion)\n- \u003c (lt), \u003c= (le), \u003e (gt), \u003e= (ge), == (eq), != (!eq), \u003e\u003e (a\u003e\u003eb shifts b bits right), \u003c\u003c (a\u003c\u003cb shifts b bits left)\n- and(\u0026\u0026), or(||), not(¬), xor, nand, nor, implies, converse\n\nFunctions:\n- sin, cos, tan, asin, acos, atan, atan(x,y), atan2(y,x), sincos(x)={sin(x),cos(x)}, cossin(x)={cos(x),sin(x)}\n- csc, sec, cot, acsc, asec, acot\n- sinh, cosh, tanh, asinh, acosh, atanh\n- csch, sech, coth, acsch, asech, acoth\n- sqrt, cbrt, square, cube, quadratic(a,b,c), cubic(a,b,c,d), quartic(a,b,c,d,e) (finds the zeros for the given polynomial, you can add a '1' to the args to only find real roots)\n- ln, log(base,num), W(k,z) (product log, branch k, defaults to k=0)\n- root(base,exp), sum(var,func,start,end), prod(var,func,start,end)\n- abs, sgn, arg\n- ceil, floor, round, int, frac, second argument specifies decimal\n- fact, doublefact, subfact\n- sinc, cis, exp\n- zeta, eta, gamma, lower_gamma, beta, erf, erfc, digamma, ai, multinomial, binomial/bi/C(n,r), P(n,r), pochhammer(x,n)\n- re, im, onlyreal, onlyimag, split(x+yi), next(n,to)\n- unity(n,k) gets all solutions for x in x^k=n\n- factors, nth_prime, is_prime, is_nan, is_inf, is_finite, gcd, lcm\n- slog(a,b), ssrt(k,a) (k is lambert w branch)\n- piecewise/pw({value,cond},{value2,cond2}...) (when first condition is met from left to right. value elsewards is nan)\n- vec(var,func,start,end) mat(var,func,start,end) (makes a vector/matrix) start..end is a shortcut to vec(n,n,start,end)\n- to_freq{a,b,c...}, to_list{{a,b},{c,d}...}, to_list{a,b,c} (sorts and counts how many time each number occurs, to_list takes that kind of data and reverses it)\n- variance/var, covariance/cov, standarddeviation/sd/σ (sample-bias corrected), skew/skewness, kurtosis\n- percentile({vec},nth) (gets number at nth percentile), percentilerank({vec},x) (gets percentile rank for x point), quartiles{vec} (gets quartiles for data set)\n- norm_pdf(x,μ,σ) (normal distribution pdf) normD(z)/norm_cdf(x,μ,σ) (area under curve to the left of z score cdf)\n- beta_pdf(x,α,β) (beta distribution pdf) beta_cdf/I(x,a,b) (regularized incomplete beta function, or beta distributions cdf)\n- gamma_pdf(x,k,θ), gamma_cdf(x,k,θ), lognorm_pdf(x,μ,σ), lognorm_cdf(x,μ,σ), binomial_pmf(k,n,p), binomial_cdf(k,n,p), neg_binomial_pmf(k,r,p), neg_binomial_cdf(k,r,p)\n- geometric_pmf(k,p), geometric_cdf(k,p), poisson_pmf(x,λ), poisson_cdf(x,λ), hypergeometric_pmf(k,N,K,n), hypergeometric_cdf(k,N,K,n), neg_hypergeometric_pmf(k,N,K,r), neg_hypergeometric_cdf(k,N,K,r)\n- rand_norm(μ,σ), rand_uniform(a,b), rand_int(a,b), rand_gamma(k,θ), rand_lognorm(μ,σ), rand_binomial(n,p), rand_neg_binomial(r,p)\n- rand_geometric(k,p), rand_bernoulli(p), rand_poisson(λ), rand_hypergeometric(N,K,n), rand_neg_hypergeometric(N,K,r)\n- roll{a,b,c...} rolls die, dice{a,b,c...} gets the frequency data any amount of different sided die, where a/b/c are number of faces for each die, both also accept {{first_dice_face,# of die},{second_dice_face,# of die}...}\n- rand_weighted{{a,n1},{b,n2}..} rolls a weighted die where a and b are face values and n1 and n2 are their weights\n- An(n,k), Ap(n,t) eulerian numbers and polynomials\n- rationalize(q), rationalizes q into a 2d vector\n- lim(x,f(x),point (,side)) both sides are checked by default, -1 for left, 1 for right\n- slope(x,f(x),point (,nth derivitive) (,0) ), can add a 0 to the args to not combine the x and y slopes for parametric equations, same for area\n- taylor(x,f(x),a,n(,p)), nth degree taylor approximation accurate around a, evaluated at point p, given no p, gives polynomial\n- area(x,f(x),from,to(,nth)(,0) ), length(x,f(x),from,to), surfacearea(a,b,z(a,b),startb,endb,starta,enda)\n- solve(x,f(x) (,point)) employs newtons method to find the root of a function at a starting point, assumes 0 if no point given, outputs Nan if newton method fails\n- extrema(x,f(x) (,point)) employs newtons method to find the extrema of a function at a starting point, assumes 0 if no point given, outputs Nan if newton method fails, outputs {x,y,positive/negitive concavity}\n- iter(x,f(x),p,n), f(x) iterated n times at point p, add \",1\" to args to show steps\n- set(a,f(a),val), sets the var 'a' to the value 'val'\n\nVector functions:\n- dot({vec1},{vec2}), cross({vec1},{vec2}), proj/project({vec1},{vec2}), oproj/oproject({vec1},{vec2})\n- angle({vec1},{vec2}), hsv_to_rgb{h,s,v}\n- norm, normalize\n- abs, len, any, all, remove({vec},{num}/{vec}), extend({vec},{num}/{vec})\n- max, min, mean, median, mode, sort, geo_mean, uniq, reverse\n- union(A,B), intersection(A,B), set_difference(A,B), symmetric_difference(A,B)\n- cartesian_product(A,B), power_set(A), set(A), subset(A,B), element(A,b)\n- part({vec},col), sum, prod\n- pol{x,y,z} outputs (r, θ, φ)\n- pol{x,y} outputs (r, θ)\n- car{r,θ,φ} outputs (x, y, z)\n- car{r,θ} outputs (x, y)\n- cyl{x,y,z} outputs (p, θ, z)\n- poly/polynomial(vec, x), evaluates a polynomial, vec={a_n,...,a_1}, as a_n x^n+...+a_1\n- other functions are applied like sqrt{2,4}={sqrt(2),sqrt(4)}\n\nMatrix functions:\n- eigenvalues, eigenvectors, generalized_eigenvectors\n- char_poly(mat(,x))\n- jcf, change_basis, rcf\n- trace/tr, determinant/det, inverse/inv\n- rref, ker, ran, null, rank\n- transpose/trans, adjugate/adj, cofactor/cof, minor\n- part({mat},col,row), flatten, sum, prod\n- abs, norm\n- len, wid\n- max, min, mean, mode, weighted_mean{{n,weight}...}\n- iden(n) produces an n dimension identity matrix\n- rotate(θ), rotate(yaw,pitch,roll) produces a rotational matrix\n- sort(mat) sorts rows by first column\n- norm_combine(mat), combines any number of normal distributions, input vectors are of form, {mu,std,weight}, when weight is not present, assumed 1, outputs {mu,std}\n- interpolate/inter(mat,x) using lagrange interpolation interpolates a 2xN matrix along x, matrix should be organized like {{x0,y0},{x1,y1} ... {xN,yN}}\n- lineofbestfit/lobf(mat,x) line of best fit for numerous 2d values, with no x values it will spit out the m/b values for line equation in form of mx+b, mat should be organized like {{x0,y0},{x1,y1} ... {xN,yN}}\n- plane(mat,x,y) finds the plane that 3, 3d points lie on, with no x/y arg it will spit out the a/b/c values for the equation of plane in ax+by+c form, mat should be in form of {{x0,y0,z0},{x1,y1,z1},{x2,y2,z2}}\n- poly/polynomial(mat, x), evaluates a polynomial, mat * {x^n,...,1}\n- other functions are applied like sqrt{{2,4},{5,6}}={{sqrt(2),sqrt(4)},{sqrt(5),sqrt(6)}}\n\nConstants:\n- c: speed of light, 299792458 m/s\n- gravity: gravity, 9.80665 m/s^2\n- G: gravitational constant, 6.67430E-11 m^3/(kg*s^2)\n- planck: planck's constant, 6.62607015E-34 J*s\n- reduced_planck: reduced planck's constant, ~1.054571817E-34 J*s\n- eV: electron volt, 1.602176634E-19 J\n- eC: elementary charge, 1.602176634E-19 C\n- eM: electron mass, 9.1093837015E-31 kg\n- pM: proton mass, 1.67262192369E-27 kg\n- nM: neutron mass, 1.67492749804E-27 kg\n- ke: coulomb's constant, 8.9875517923E9 N*m^2/C^2\n- Na: avogadro's number, 6.02214076E23 1/mol\n- R: gas constant, 8.31446261815324 J/(mol*K)\n- boltzmann: boltzmann constant, 1.380649E-23 J/K\n- phi/φ: golden ratio, 1.6180339887~\n- e: euler's number, 2.7182818284~\n- pi/π: pi, 3.1415926535~\n- tau/τ: tau, 6.2831853071~\n\nUnits:\nsupports metric and binary prefixes\nignores \"s\" at the end to allow \"meters\" and stuff\n\"units\" function will extract the units of a number for == checks and stuff\nthe following units are supported\n\"m\" | \"meter\"\n\"s\" | \"second\"\n\"A\" | \"ampere\"\n\"K\" | \"kelvin\"\n\"u\" | \"unit\"\n\"mol\" | \"mole\"\n\"cd\" | \"candela\"\n\"g\" | \"gram\"\n\"J\" | \"joule\"\n\"mph\"\n\"mi\" | \"mile\"\n\"yd\" | \"yard\"\n\"ft\" | \"foot\"\n\"in\" | \"inch\"\n\"lb\" | \"pound\"\n\"L\" | \"l\" | \"litre\"\n\"Hz\" | \"hertz\"\n\"V\" | \"volt\" | \"voltage\"\n\"°C\" | \"celsius\"\n\"°F\" | \"fahrenheit\"\n\"Wh\"\n\"Ah\"\n\"year\"\n\"month\"\n\"ly\"\n\"kph\"\n\"T\" | \"tesla\"\n\"H\" | \"henry\"\n\"weber\" | \"Wb\"\n\"siemens\" | \"S\"\n\"F\" | \"farad\"\n\"W\" | \"watt\"\n\"Pa\" | \"pascal\"\n\"Ω\" | \"ohm\"\n\"min\" | \"minute\"\n\"h\" | \"hour\"\n\"day\"\n\"week\"\n\"N\" | \"newton\"\n\"C\" | \"coulomb\"\n\"°\" | \"deg\" | \"degrees\"\n\"arcsec\"\n\"arcmin\"\n\"rad\" | \"radians\"\n\"grad\" | \"gradians\"\n\"lumen\" | \"lm\"\n\"lux\" | \"lx\"\n\"nit\" | \"nt\"\n\"byte\" | \"B\"\n\"gray\" | \"Gy\"\n\"sievert\" | \"Sv\"\n\"katal\" | \"kat\"\n\"bit\"\n\"steradian\" | \"sr\"\n\"atm\"\n\"psi\"\n\"bar\"\n\"tonne\"\n\"hectare\" | \"ha\"\n\"acre\" | \"ac\"\n\"ton\"\n\"oz\"\n\"gallon\" | \"gal\"\n\"lbf\"\n\"parsec\" | \"pc\"\n\"au\"\n\"floz\"\n\"AUD\",\"CAD\",\"CNY\",\"EUR\",\"GBP\",\"HKD\",\"IDR\",\"INR\",\"JPY\",\"KRW\",\"MYR\",\"NZD\",\"PHP\",\"SGD\",\"THB\",\"TWD\",\"VND\",\"BGN\",\"BRL\",\"CHF\",\"CLP\",\"CZK\",\"DKK\",\"HUF\",\"ILS\",\"ISK\",\"MXN\",\"NOK\",\"PLN\",\"RON\",\"SEK\",\"TRY\",\"UAH\",\"ZAR\",\"EGP\",\"JOD\",\"LBP\",\"AED\",\"MDL\",\"RSD\",\"RUB\",\"AMD\",\"AZN\",\"BDT\",\"DOP\",\"DZD\",\"GEL\",\"IQD\",\"IRR\",\"KGS\",\"KZT\",\"LYD\",\"MAD\",\"PKR\",\"SAR\",\"TJS\",\"TMT\",\"TND\",\"UZS\",\"XAF\",\"XOF\",\"BYN\",\"PEN\",\"VES\",\"ARS\",\"BOB\",\"COP\",\"CRC\",\"HTG\",\"PAB\",\"PYG\",\"UYU\",\"NGN\",\"AFN\",\"ALL\",\"ANG\",\"AOA\",\"AWG\",\"BAM\",\"BBD\",\"BHD\",\"BIF\",\"BND\",\"BSD\",\"BWP\",\"BZD\",\"CDF\",\"CUP\",\"CVE\",\"DJF\",\"ERN\",\"ETB\",\"FJD\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HNL\",\"JMD\",\"KES\",\"KHR\",\"KMF\",\"KWD\",\"LAK\",\"LKR\",\"LRD\",\"LSL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRU\",\"MUR\",\"MVR\",\"MWK\",\"MZN\",\"NAD\",\"NIO\",\"NPR\",\"OMR\",\"PGK\",\"QAR\",\"RWF\",\"SBD\",\"SCR\",\"SDG\",\"SOS\",\"SRD\",\"SSP\",\"STN\",\"SVC\",\"SYP\",\"SZL\",\"TOP\",\"TTD\",\"TZS\",\"UGX\",\"VUV\",\"WST\",\"XCD\",\"XPF\",\"YER\",\"ZMW\"\n\nDigraph:\nhit escape then a letter\na=\u003eα, A=\u003eΑ, b=\u003eβ, B=\u003eΒ, c=\u003eξ, C=\u003eΞ, d=\u003eΔ, D=\u003eδ,\ne=\u003eε, E=\u003eΕ, f=\u003eφ, F=\u003eΦ, g=\u003eγ, G=\u003eΓ, h=\u003eη, H=\u003eΗ,\ni=\u003eι, I=\u003eΙ, k=\u003eκ, Κ=\u003eΚ, l=\u003eλ, L=\u003eΛ, m=\u003eμ, M=\u003eΜ,\nn=\u003eν, Ν=\u003eΝ, o=\u003eο, O=\u003eΟ, p=\u003eπ, P=\u003eΠ, q=\u003eθ, Q=\u003eΘ,\nr=\u003eρ, R=\u003eΡ, s=\u003eσ, S=\u003eΣ, t=\u003eτ, T=\u003eΤ, u=\u003eυ, U=\u003eΥ,\nw=\u003eω, W=\u003eΩ, y=\u003eψ, Y=\u003eΨ, x=\u003eχ, X=\u003eΧ, z=\u003eζ, Z=\u003eΖ,\n+=\u003e±, ==\u003e≈, `=\u003eⁱ, _=\u003e∞, ;=\u003e°\nnumbers/minus sign convert to superscript acting as exponents\n```\n\n# basic example usage\n\n```\nkalc\n\u003e 1+1\n2\n\u003e f(x)=sin(2x) //define f(x), will display how it was parsed\nsin(2*x)\n\u003e f(x) // graphs f(x) in 2D\nsin(2*x)\n\u003e f(pi/2) // evaluates f(x) at x=pi/2, so sin(2pi/2)=sin(pi)=0\n0\n\u003e f(x,y)=x^2+y^2\nx^2+y^2\n\u003e f(1,2) // evaluates f(x,y) at x=1, y=2, so 1^2+2^2=5\n5\n\u003e f(x,y) // graphs f(x,y) in 3D\nx^2+y^2\n\u003e a=3^3\n3^3\n\u003e cbrt(a)\n3\n\u003e im(exp(xi)) // graphs the imag part of exp(xi) in 2D, so sin(x)\nim(exp(x*1i))\n\u003e f(x,y,z,w)=x+y+z+w\nx+y+z+w\n\u003e f(1,2,3,4) // evaluates f(x,y,z,w) at x=1, y=2, z=3, w=4, so 1+2+3+4=10\n10\n\u003e f(x,y,2,5) // graphs f(x,y,2,5) in 3D with z=2 and w=5 so x+y+2+5\nx+y+2+5\n\u003e f(2,5,x,y) // graphs f(2,5,x,y) in 3D with x=2 and y=5 so 2+5+x+y, to graph x and y have to be the unknown variables\n2+5+x+y\n\u003e |z| // graphs |(x+yi)| in 3D\nnorm((x+y+1i))\n\u003e deg // enables degrees\n\u003e pol({5,3,2}+{1,2,3}) // prints {magnitude, θ, φ} of {5,3,2}+{1,2,3}\n{9.273618495496,57.373262293469,39.805571092265}\n\u003e piecewise({+-sqrt(2^2-x^2),(x\u003c2)\u0026\u0026(x\u003e-2)}) # 3{cos(x),sin(x)} # [5,x] # graph=flat;exp(ix) //graphing circles 4 different ways\npiecewise({0±sqrt(2^2-x^2),(x\u003c2)\u0026\u0026(x\u003e-2)})\n3*{cos(x),sin(x)}\nexp(1i*x)\n```\n\n### cli usage\n\n```\necho -ne 'sqrt(pi) \\n pi^2'|kalc\n1.7724538509055159\n9.869604401089358\n\nkalc 'sqrt(pi)' 'pi^2'\n1.7724538509055159\n9.869604401089358\n\necho -ne 'sin(x)#cos(x)'|kalc // graphs sin(x) and cos(x) in 2D\nkalc 'sin(x)#cos(x)' // graphs sin(x) and cos(x) in 2D\n```\n\n### more advanced usage\n\nsee kalc.vars in repo\n\n# graphing\n\nmy gnuplot config in ~/.gnuplot\n\n```\nset terminal x11\nset xyplane 0\n```\n\nchars available for point style:\n\n```\n. - dot\n+ - plus\nx - cross\n* - star\ns - empty square\nS - filled square\no - empty circle\nO - filled circle\nt - empty triangle\nT - filled triangle\nd - empty del (upside down triangle)\nD - filled del (upside down triangle)\nr - empty rhombus\nR - filled rhombus\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgkillas%2Fkalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgkillas%2Fkalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgkillas%2Fkalc/lists"}