QALC(1) General Commands Manual QALC(1) (NAME) qalc - (SYNOPSIS) qalc [options] [expression] (DESCRIPTION) Qalculate! . ( ) . ( ) . qalc Qalculate! . (OPTIONS) -b, --base base -c, --color --defaults -e, --exrates -f, --file file -h, --help -i, --interactive -l, --list [search term] --list-functions [search term] --list-prefixes [search term] --list-units [search term] --list-variables [search term] -m, --time milliseconds -n, --nodefs --nocurrencies --nodatasets --nofunctions --nounits --novariables -p [base] ( -b "base base" -s "xor^" ) -s, --set "option value" set (: --set "base 16") -t, --terse -/+u8 (Unicode) -v, --version ( ) . (COMMANDS) approximate set approximation try exact. assume assumptions (unknown non-zero positive negative non-positive non-negative + number real rational integer boolean). base base ( set base). clear . clear history . delete name . : delete var1. exact set approximation exact. expand . exrates . factor (). find, list [name] . 'currencies' 'functions' 'variables' 'units' 'prefixes' . / . . : list functions. : find dinar. : find variables planck. function name expression . '\x' '\y' '\z' '\a' . . : function func1 5*\x. help [command] history . info name . : info sin. keep/unkeep name (). : keep var1. MC/MS/M+/M- ( ). MR/MRC ..PP mode . partial fraction . save, store name [category] [title] . ( <>) . name <> <> . : store var1 save definitions save mode set option value to, convert, -> unit/"to"-command . <> . : to m/s : to bin variable name expression . (result only) . : variable var1 pi / 2 quit/exit . RPN: rpn state (RPN) . <> RPN <> RPN . <> (1) <> (0) / . stack RPN . clear stack RPN . copy [index] RPN . . 1 . move index 1 [index 2] RPN . 1 . : move 2 4 pop [index] RPN . 1 . rotate [direction] RPN () . swap [index 1] [index 2] RPN . ( 1 2) . 1 . : swap 2 4 <> . (KEYBINDINGS) Tab (Ctrl+I) ( ). Ctrl+A . Ctrl+D . Ctrl+E (exact try exact auto) . Ctrl+F (simple decimal auto) . Ctrl+L . (SETTINGS) set ( set base 16) -s, --set ( qalc -s "base 16") . . on off yes no 1 0 . 1 . <<*>> . : algebra mode, alg (1* = expand, 2 = factorize) . assume nonzero denominators, nzd (on*, off) (x/x=1). warn nonzero denominators, warnnzd (on*, off) . assumptions, asm (unknown*, non-zero, positive, negative, non-positive, non-negative + number, real*, rational, integer, boolean) . : angle unit, angle (0 = none, 1* = radians, 2 = degrees, 3 = gradians, 4 = custom) . approximation, appr (-1* = auto, 0 = exact, 1 = try exact, 2 = approximate, 3 = dual) . exact . interval arithmetic, ia (on*, off) / ( ). interval calculation, ic (1* = variance formula, 2 = interval arithmetic) / . precision, prec (> 0) 10* . : calculate functions, calcfunc (on*, off) calculate variables, calcvar (on*, off) complex numbers, cplx (on*, off) functions, func (on*, off) infinite numbers, inf (on*, off) units (on*, off) unknowns (on, off*) . variables, var (on*, off) variable units, varunits (on*, off) ( c = 299792458 ms). : abbreviations, abbr (on*, off) . color (0 = off, 1* = default, 2 = light) . division sign, divsign (0* = /, 1 = division slash, 2 = division sign) excessive parentheses, expar (on, off*) minus last, minlast (on*, off) ..PP multiplication sign, mulsign (0 = *, 1 = multiplication dot, 2* = multiplication x, 3 = middle dot) short multiplication, shortmul (on*, off) spacious, space (on*, off) . spell out logical, spellout (on*, off) unicode, uni (on*, off) . unicode exponents, uniexp (0 = off, 1* = on, 2 = units) 0-9 . vertical space, vspace (on*, off) . : base (-1114112 - 1114112, bin, oct, dec*, hex, sexa, time, roman) base display, basedisp (0 = none, 1* = normal, 2 = alternative) binary bits, bits (0* = auto, >= 2) complex form, cplxform (0* = rectangular, 1 = exponential, 2 = polar, 3 = cis, 4 = angle) decimal comma (locale*, off, on) . digit grouping, group (0* = off, 1 = standard, 2 = locale) digits (-1* = auto, >= 2) ( ). exp display, edisp (E*, e, 10) ( 3E6 3e6 3 * 10^6). fractions, fr (-1* = auto, 0 = off, 1 = exact, 2 = on, 3 = mixed, 4 = long, 5 = dual, 1/n) ( 5/4 = 1 + 1/4 = 1.25). 'long' . hexadecimal two's, hextwos (on, off*) . imaginary j, imgj (on, off*) 'j' ( 'i') . interval display, ivdisp (0* = adaptive, 1 = significant, 2 = interval, 3 = plusminus, 4 = midpoint, 5 = lower, 6 = upper, 7 = concise, 8 = relative) lowercase numbers, lownum (on, off*) . max decimals, maxdeci (-1* = off, >= 0) min decimals, mindeci (-1* = off, >= 0) repeating decimals, repdeci (0 = off*, 1 = ellipsis, 2 = overline) 1/6 '0.1 666...' '0.166667'. rounding (0* = half away from zero, 1 = half to even, 2 = toward zero, 3 = half to odd, 4 = half toward zero, 5 = half up, 6 = half down, 7 = half random, 8 = away from zero, 9 = up, 10 = down) . scientific notation, exp (0 = off, -1* = auto, -3 = engineering, 1 = pure, 3 = scientific, >= 0, <= -2) ( 5 543 000 = 5.543E6). >= 0 . <= -2 . show ending zeroes, zeroes (on*, off) . two's complement, twos (on*, off) . duodecimal symbols, duosyms (on, off*) . (Parsing): caret as xor, xor^ (on, off*) ^ XOR. concise uncertainty, concise (on, off*) . decimal comma (locale*, off, on) . hexadecimal two's input, hextwosin(on, off*) . binary bits . ignore comma (on, off*) ',' . ignore dot (on, off*) '.' . imaginary j, imgj (on, off*) 'j' ( 'i') . input base, inbase (-1114112 - 1114112, bin, oct, dec*, hex, roman) limit implicit multiplication, limimpl (on, off*) parsing mode, syntax (0* = adaptive, 1 = implicit first, 2 = conventional, 3 = chain, 4 = rpn) (syntax) . read precision, readprec (0* = off, 1 = always, 2 = when decimals) (3.20 = 3.20+/-0.005). simplified percentage, percent (on*, off) (100 + 10% = 110). two's input, twosin (on, off*) . binary bits . (Units): all prefixes, allpref (on, off*) hecto deca deci centi . autoconversion, conv (0 = none, 1* = optimal, 2 = base, 3 = optimalsi, 4 = mixed) . 'optimalsi' SI 'optimal' . binary prefixes, binpref (on, off*) . currency conversion, curconv (on*, off) . default currency, currency denominator prefixes, denpref (on*, off) . place units separately, unitsep (on*, off) . prefixes, pref (on*, off) . show negative exponents, negexp (on, off*) (m/s = m*s^-1). sync units, sync (on*, off) temperature calculation, temp (0* = hybrid, 1 = absolute, 2 = relative) ( hybrid )..PP update exchange rates, upxrates (-1* = ask, 0 = never, > 0 = days) : calculate as you type, autocalc (on, off*) . clear history (yes, no*) . completion (0 = off, 1* = select multiple, 2 = select, 3 = list multiple, 4 = list) tab . <> <> . ignore locale (yes, no*) ( ). language max history (>= 0) 100* . prompt rpn (on, off*) (Reverse Polish Notation) . save config (yes*, no) qalc.cfg . save definitions (yes*, no) . save mode (yes*, no) . sigint action, sigint (0 = kill, 1* = exit, 2 = interrupt) SIGINT ( Ctrl+C) . (SYNTAX) : (Numbers) 0-9 -- / . . . <> ( <>) 1- . (<<5 5 = 55>>). <> ( <>) 10 ( <<5E3 = 5000>>). ( ) ( <<5:30 = 5.5>>). <<0b>> <<0o>> <<0d>> <<0x>> 2 8 12 16 ( <<0x3f = 63>>). (Intervals) ()interval ()uncertainty <<+->> <<+/->> ( 5+-1 = uncertainty(5, 0.2) = interval(4, 6)). read precision ( 1.1 = 1.1+-0.05). () ( ) . (Vectors and Matrices) . . [1 2 3 4] [1 2; 3 4] (1, 2, 3, 4) ((1, 2), (3, 4)). <<...>> ( <<1...4>>) ( <<[1:4]>> <<[1:1:4]>> ) . ( 1 ) ( <> <>). / (Variables/Constants) .I list variables . (Functions) .I list functions . (Units and Prefixes) .I list units . . ( 5 mm = 0.005 m 5 m m = 5 m^2). ( 5 m2 = 5 m^2) . (Unknowns) . . (\) ( 5\a + 2\b) ( 5 "apples" + 2 "bananas") . . (Date and Time) / ( ) (YYYY-MM-DDTHH:MM:SS) . . (Z/UTC/GMT +/-HH:MM). / . . (Text) . . (Comments) ( (5*2)/2 #calculating triangle area) . ( AND ): (+) (-) (*) (/) (%, rem) (%%, mod) . (//, div) . (^, **) x^y^z x^(y^z) (x^y)^z. ((-8)^(1/3) 1 + 1.73i 2-). ()cbrt ()root . 10^x (E) ((, )) (, ||) . || OR . (!, NOT, ||, OR, &&, AND, XOR, NOR, NAND) (~, |, &, <<, >>, XOR) (=, !=, <, <=, >, >=) 1 0 . x () . . (.) (.*, ./, .^) (, , , , , , , , , , , ) (:=, =) ( var1:=5, func1():=x+y, var1=ln(5)+2). . : 10^x NOT NOT // / NOT AND XOR OR AND OR . / ( 5x 5(2+3)) . (conventional mode) (12/2(1+2) = 12/2*3 = 18 5x/5y = 5 * x/5 * y = xy). (implicit multiplication first) (12/2(1+2) = 12/(2 * 3) = 2 5x/5y = (5 * x)/(5 * y) = x/y). (adaptive mode) (1/5x = 1/(5 * x) 1/5 x = (1/5) * x). (5 m/5 m/s = (5 * m)/(5 * (m/s)) = 1 s). (sqrt 2x = sqrt(2x)). (chain mode) (1+2*3 = (1+2)*3 = 9). <> . << to >> ( <<->>> <<>>>) / . - ( meter km/h) ? b? + - / - ( c) - base ( ) - optimal ( ) - prefix ( ) - mixed ( + ) - bin, binary ( ) - bin# ( ) - oct, octal ( ) - duo, duodecimal ( ) - hex, hexadecimal ( ) - hex# ( ) - sexa, sexa2, sexa3, sexagesimal ( sexa2 sexa3 ) - latitude, latitude2, longitude, longitude2 ( / latitude2 longitude2 ) - bijective ( 26 ) - fp16, fp32, fp64, fp80, fp128 ( ) - bcd ( ) - roman ( ) - time ( ) - unicode - base # ( ) - bases ( ) - rectangular, cartesian ( /) - exponential ( ) - polar ( ) - cis ( cis) - angle, phasor ( /) - UTC ( UTC) - UTC+/-hh[:mm] ( ) - calendars () - fraction, 1/n ( ) - decimals ( ) - 1/# ( ) - - sci, scientific ( ) - eng, engineering ( ) - simple ( ) - factors ( ) - partial fraction ( ) - latex ( LaTeX) where ( "/.") ( "to") ( "x+y where x=1 and y=2" "x^2=4 where x>0" "sin(5) where sin()=cos()"). "x=1, y=2, x+y" . to where . ( ) / . (EXAMPLES) - (semicolon) . sqrt 4 = sqrt(4) = 4^(0.5) = 4^(1/2) = 2 sqrt(25; 16; 9; 4) = [5 4 3 2] sqrt(32) = 4 * sqrt(2) ( ) cbrt(-27) = root(-27; 3) = -3 ( ) (-27)^(1/3) = 1.5 + 2.5980762i ( ) ln 25 = log(25; e) = 3.2188758 log2(4)/log10(100) = log(4; 2)/log(100; 10) = 1 5! = 1 * 2 * 3 * 4 * 5 = 120 5\2 ( ) = 5//2 = trunc(5/2) = 2 5 mod 3 = mod(5; 3) = 2 52 to factors = 2^2 * 13 25/4 * 3/5 to fraction = 3 + 3/4 gcd(63; 27) = 9 sin(pi/2) - cos(pi) = sin(90 deg) - cos(180 deg) = 2 sum(x; 1; 5) = 1 + 2 + 3 + 4 + 5 = 15 sum(\i^2+sin(\i); 1; 5; \i) = 1^2 + sin(1) + 2^2 + sin(2) + ... = 55.176162 product(x; 1; 5) = 1 * 2 * 3 * 4 * 5 = 120 var1:=5 5 var1 5^2 #this is a comment = 25 sinh(0.5) where sinh()=cosh() = cosh(0.5) = 1.1276260 plot(x^2; -5; 5) y=x^2 -5 5 5 dm3 to L = 5 dm^3 to L = 5 L 20 miles / 2h to km/h = 16.09344 km/h 1.74 to ft = 1.74 m to ft = 5 ft + 8.5039370 in 1.74 m to -ft = 5.7086614 ft 100 lbf * 60 mph to hp = 16 hp 50 * 2 A = 100 V 50 * 2 A to base = 100 kg*m^2*s^-3*A^-1 10 N / 5 Pa = (10 N)/(5 Pa) = 2 m^2 5 m/s to s/m = 0.2 s/m 500 EUR - 20% to USD = 451.04 USD 500 megabit/s * 2 h to b?byte = 419.09516 gibibytes k_e / G * a_0 = (coulombs_constant / newtonian_constant) * bohr_radius = 7.126e9 kg*H*m^-1 planck (compton_wavelength * c) = 9.1093837e-31 kg 5 ns * rydberg to c = 6.0793194E-8c atom(Hg; weight) + atom(C; weight) * 4 to g = 4.129e-22 g (G * planet(earth; mass) * planet(mars; mass))/(54.6e6 km)^2 = 8.58e16 N ( ) sin(5+/-0.2)^2/2+/-0.3 = 0.460+-0.088 (0.46+/-0.12) (2+/-0.02 J)/(523+/-5 W) = 3.824+/-0.053 ms (3.82+/-+-0.075 ms) interval(-2; 5)^2 = interval(-8.2500000; 12.750000) (interval(0; 25)) (5x^2 + 2)/(x - 3) = 5x + 15 + 47/(x - 3) (\a + \b)(\a - \b) = ("a" + "b")("a" - "b") = 'a'^2 - 'b'^2 (x + 2)(x - 3)^3 = x^4 - 7x^3 + 9x^2 + 27x - 54 factorize x^4 - 7x^3 + 9x^2 + 27x - 54 = x^4 - 7x^3 + 9x^2 + 27x - 54 to factors = (x + 2)(x - 3)^3 cos(x)+3y^2 where x=pi and y=2 = 11 gcd(25x; 5x^2) = 5x 1/(x^2+2x-3) to partial fraction = 1/(4x - 4) - 1/(4x + 12) x+x^2+4 = 16 x = 3 or x = -4 x^2/(5 m) - hypot(x; 4 m) = 2 m where x > 0 x = 7.1340411 m cylinder(20cm; x) = 20L x = (1 / (2pi)) m x = 16 cm ( ) asin(sqrt(x)) = 0.2 x = sin(0.2)^2 x = 0.039469503 x^2 > 25x = x > 25 or x < 0 solve(x = y+ln(y); y) = lambertw(e^x) solve2(5x=2y^2; sqrt(y)=2; x; y) = 32/5 multisolve([5x=2y+32, y=2z, z=2x]; [x, y, z]) = [-32/3 -128/3 -64/3] dsolve(diff(y; x) - 2y = 4x; 5) = 6e^(2x) - 2x - 1 diff(6x^2) = 12x diff(sinh(x^2)/(5x) + 3xy/sqrt(x)) = (2/5) * cosh(x^2) - sinh(x^2)/(5x^2) + (3y)/(2 * sqrt(x)) integrate(6x^2) = 2x^3 + C integrate(6x^2; 1; 5) = 248 integrate(sinh(x^2)/(5x) + 3xy/sqrt(x)) = 2x * sqrt(x) * y + Shi(x^2) / 10 + C integrate(sinh(x^2)/(5x) + 3xy/sqrt(x); 1; 2) = 3.6568542y + 0.87600760 limit(ln(1 + 4x)/(3^x - 1); 0) = 4 / ln(3) [1, 2, 3; 4, 5, 6] = ((1; 2; 3); (4; 5; 6)) = [1 2 3; 4 5 6] ( 2x3) 1...5 = (1:5) = (1:1:5) = [1 2 3 4 5] (1; 2; 3) * 2 - 2 = [(1 * 2 - 2), (2 * 2 - 2), (3 * 2 - 2)] = [0 2 4] [1 2 3].[4 5 6] = dot([1 2 3]; [4 5 6]) = 32 ( ) cross([1 2 3]; [4 5 6]) = [-3 6 -3] ( ) [1 2 3; 4 5 6].*[7 8 9; 10 11 12] = hadamard([1 2 3; 4 5 6]; [7 8 9; 10 11 12]) = [7 16 27; 40 55 72] ( ) [1 2 3; 4 5 6] * [7 8; 9 10; 11 12] = [58 64; 139 154] ( ) [1 2; 3 4]^-1 = inverse([1 2; 3 4]) = [-2 1; 1.5 -0.5] mean(5; 6; 4; 2; 3; 7) = 4.5.PP stdev(5; 6; 4; 2; 3; 7) = 1.87 quartile([5 6 4 2 3 7]; 1) = percentile((5; 6; 4; 2; 3; 7); 25) = 2.9166667 normdist(7; 5) = 0.053990967 spearman(column(load(test.csv); 1); column(load(test.csv); 2)) = -0.33737388 ( CSV ) 10:31 + 8:30 to time = 19:01 10h 31min + 8h 30min to time = 19:01 now to utc = "2020-07-10T07:50:40Z" "2020-07-10T07:50CET" to utc+8 = "2020-07-10T14:50:00+08:00" "2020-05-20" + 523d = addDays(2020-05-20; 523) = "2021-10-25" today - 5 days = "2020-07-05" "2020-10-05" - today = days(today; 2020-10-05) = 87 timestamp(2020-05-20) = 1 589 925 600 stamptodate(1 589 925 600) = "2020-05-20T00:00:00" "2020-05-20" to calendars 52 to bin = 0011 0100 52 to bin16 = 0000 0000 0011 0100 52 to oct = 064 52 to hex = 0x34 0x34 = hex(34) = base(34; 16) = 52 523<<2&250 to bin = 0010 1000 52.345 to float = 0100 0010 0101 0001 0110 0001 0100 1000 float(01000010010100010110000101001000) = 1715241/32768 = 52.345001 floatError(52.345) = 1.2207031e-6 52.34 to sexa = 5220'24" 1978 to roman = MCMLXXVIII 52 to base 32 = 1K sqrt(32) to base sqrt(2) = 100000.SH " (SEE ALSO)" https://qalculate.github.io/manual/index.html ( ) (BUGS) https://github.com/Qalculate/libqalculate/issues . (AUTHORS) Hanna Knutsson . 13 July 2020 QALC(1)