wcalc(1)
okay bestie, welcome to wcalc(1) โ yes that's the General Commands Manual page, and yes we're about to make a calculator sound like the most fun thing that's ever happened to your terminal ๐
๐ NAME ๐
wcalc โ a natural-expression command-line calculator ๐งฎโจ
๐ SYNOPSIS ๐
wcalc [ options ] [ expression ... ]
๐ฆ DESCRIPTION ๐ฆ
okay so wcalc is a command-line calculator and the whole point of it is that it accepts all valid mathematical expressions. Like, all of them. It's giving main character energy for math ๐ซถ
Here's what it's got:
- all standard mathematical operations
- parenthesis
- brackets
- trigonometric functions
- hyperbolic trig functions
- logs
- boolean operators
Now the fun part โ the way it takes input, because there's a whole vibe check happening here. wcalc accepts input in a variety of manners:
- If no mathematical expression is given at the commandline, it will evaluate the contents of an environment variable named
wcalc_inputif one exists. - If that variable is not set,
wcalcwill try to read input from standard input (i.e. piped input). - If there is no input from that,
wcalcenters "interactive" mode. Interactive mode has more features. ๐
While in interactive mode, detailed information about commands, functions, symbols, and variables can be obtained by executing:
\explain thing-to-explain
no cap, that's the whole cheat code. ๐ง
โจ OPTIONS โจ
-Hor--helpโ Prints a help usage message to standard output, then exits. ๐-Eโ Specifies that numerical output should be in scientific notation. ๐ฌ-EEโ Specifies that numerical output should NOT be in scientific notation. ๐-PXXXโ Sets the "precision", or the number of decimal places displayed, to beXXX. This setting only affects output, not internal representations. If the precision is set to-1, the number of decimal places displayed will depend on the value. Precision is set to autoadjust (-1) by default. Example:wcalc -P6๐-vor--versionโ Prints the version number and exits.-dor-decor--decimalโ Results are printed in decimal (base 10). This option is the default, and does not have a default prefix to indicate that numbers are in base 10. ๐-hor-hexor--hexadecimalโ Results are printed in hexadecimal (base 16). Numbers printed in hexadecimal have a prefix of0xunless the-por--prefixesoption is used. ๐-oor-octor--octalโ Results are printed in octal (base 8). Numbers printed in octal have a prefix of0unless the-por--prefixesoption is used.-bor-binor--binaryโ Results are printed in binary (base 2). Numbers printed in binary have a prefix of0bunless the-por--prefixesoption is used. ๐ค-por--prefixesโ Toggles printing prefixes for hexadecimal, octal, and binary forms.-lor--lenientโ Makes the parser assume that uninitialized variables have a value of zero. ๐-ror--radiansโ Toggles whether trigonometric functions assume input (and output) is in radians. By default, trigonometric functions assume input is in degrees. ๐-qor--quietโ Toggles whether the equals sign will be printed before the results. ๐คซ-cor--conservativeโ Toggles accuracy guards. okay this one needs the full lore, so here it is: Because of the way floating point numbers are stored in computers, some numbers cannot be represented exactly (such as0.1). Because of this, calculating with those numbers can produce results that are not exactly correct, but are different from the correct answer by a very small value (smaller than the floating point value can represent accurately). For example, the calculation of1-.9-.1can return an extremely small number that is not zero but is less than what can be represented accurately, and thus for all intents and purposes, it is0. The accuracy guard feature will round numbers to zero if they are less than the representable accuracy of the floating point number. However, sometimes numbers that small or smaller need to be displayed, and thus the accuracy guard should be turned off. Alternatively, the number of internal bits could be increased, which makes it possible to represent numbers with more accuracy. ๐-uor--units [type]โ Prints units used for conversions; parameter type can be:lengths,areas,volumes,masses,speeds,powers,forces,accelerations,temperatures,angles, orpressures. If the parameter is not supplied, all units are printed. ๐--rememberโ Toggles whether or not expressions that produce errors are remembered in the history. Does not affect command-line math. ๐ง- **
--round={none|simple|sig_fig} โ Wcalc can attempt to warn you when numbers have been rounded in the output display. It has two methods of keeping track---either by using significant figures (sig_fig), or by a simple digit-counting algorithm. Rounding in the command-line version is denoted by a tilde before the equals sign (~=). Rounding in the GUI version is denoted by changing the text color to red. In some cases, Wcalc may think that the number has been rounded even if it shouldn't have been necessary (this is because of the way floating point numbers are represented internally). ๐จ --dsep=Xโ Sets the decimal separator character to beX.--tsep=Xโ Sets the thousands separator character to beX.--idsep=Xโ Sets the input-only decimal separator character to beX.--itsep=Xโ Sets the input-only thousands separator character to beX.--bitsXXXXโ Sets the number of bits of memory that will be used to internally represent numbers to beXXXX. The default is1024. Set higher if you need to work with extremely large or extremely small numbers, set lower if you want to use less memory. ๐งฎ--intsโ Toggles whether long integers will be abbreviated or not. This conflicts with engineering notation for large numbers, but not for decimals.--verboseโ Toggles verbose mode, which displays the expression to be calculated before calculating it. ๐ฃ๏ธ--defaultsโ Prevents reading the.wcalcrcfile.-Cor--colorโ Toggles the use of color in the commandline output. ๐ (yes, the tool is also a little bit extra, we love that for it)
๐ USER-DEFINED VARIABLES ๐
Variables are supported and may be assigned using the = operator. To assign a variable use the form:
foo = anylegalexpression
Thereafter, that variable name is the same as the literal value it represents. Expressions can be stored in variables like this:
foo = 'anylegalexpression'
Expressions stored this way will be interpreted at evaluation time, rather than assignment-time. Note that these cannot be recursive. ๐
All variables may also be stored with a description of what they are. This description is added in the form of a quoted string after the assignment, like this:
foo = 'anylegalexpression' 'description'
๐ ACTIVE VARIABLES ๐
Active variables are designed to give a functionality similar to user-defined functions. They are variables that rather than representing a value, represent an expression that is evaluated whenever the variable is evaluated. This expression may contain other variable names. For example, after the following sequence of commands:
foo=5
bar='foo+4'
The variable bar will evaluate to 9, or four more than whatever foo evaluates to be. These can be stacked, like so:
baz='sin(bar)+foo'
In this case, baz will evaluate to be 5.15643, or the sin of whatever foo+4 is plus whatever foo is. ๐คฏ
To demonstrate the utility of these active variables, here are two functions written by Stephen M. Lawson. The first computes the weekday of a given day (dy) in a given month (mo) in a given year (yr). The value it returns is in the range of 1 to 7, where 1 is Sunday, 2 is Monday, 3 is Tuesday, and so forth. ๐
weekday='(((floor((yr - floor(0.6 + 1 / mo)) / 400) - floor((yr -
floor(0.6 + 1 / mo)) / 100) + floor((5 * (yr - floor(0.6 + 1 / mo))) /
4) + floor(13 * (mo + 12 * floor(0.6 + 1 / mo) + 1) / 5)) - (7 *
floor((floor((yr - floor(0.6 + 1 / mo)) / 400) - floor((yr - floor(0.6 +
1 / mo)) / 100) + floor((5 * (yr - floor(0.6 + 1 / mo))) / 4) + floor(13
* (mo + 12 * floor(0.6 + 1 / mo) + 1) / 5)) / 7)) + 1) + 5 + dy) % 7 +
1'
The second function computes what day Easter will be for a given year (yr) and returns an offset from March 31st. For example, for the year 2005, it returns -4, which means March 27th. Because of leap-year problems, this only works from the year 1900 to 2099, but is a good demonstration nevertheless. ๐ฃ
easter='((19 * (yr - 19 * floor(yr / 19)) + 24) - floor((19 * (yr - 19 *
floor(yr / 19)) + 24) / 30) * 30) + ((2 * (yr - 4 * floor(yr / 4)) + 4 *
(yr - 7 * floor(yr / 7)) + 6 * ((19 * (yr - 19 * floor(yr / 19)) + 24) -
floor((19 * (yr - 19 * floor(yr / 19)) + 24) / 30) * 30) + 5) - floor((2
* (yr - 4 * floor(yr / 4)) + 4 * (yr - 7 * floor(yr / 7)) + 6 * ((19 *
(yr - 19 * floor(yr / 19)) + 24) - floor((19 * (yr - 19 * floor(yr /
19)) + 24) / 30) * 30) + 5) / 7) * 7) - 9'
and that's just part one bestie, there's more coming so don't go anywhere ๐
โจ BUILT-IN SYMBOLS โจ
okay so wcalc comes preloaded with goodies, and there's two flavors of them: functions and constants. that's it, that's the whole vibe. let's get into it ๐
๐ธ FUNCTIONS ๐ธ
bestie, the functions in wcalc are almost all self-explanatory (the manpage said it, not me ๐). here's the rundown anyway:
sincostancotโ the standard trigonometric functions, iconic behavior frasinacosatanacotorarcsinarccosarctanarccotorsin^-1cos^-1tan^-1cot^-1โ the standard arc-trigonometric functions. three whole ways to write them, pick your fighter ๐sinhcoshtanhcothโ the standard hyperbolic trigonometric functionsasinhacoshatanhacothorarcsinharccosharctanharccothorsinh^-1cosh^-1tanh^-1coth^-1โ the standard arc-hyperbolic trigonometric functionsloglnlogtwoโ log-base-ten, log-base-e and log-base-two, respectively. and remember, you can also construct log-base-X of number Y by computinglog(Y)/log(X)โจroundโ returns the integral value nearest to the argument according to the typical rounding rulesabsโ returns the absolute value of the argumentceilceilingfloorโ returns the ceiling or floor of the argumentsqrtcbrtโ the square and cube root functionsrandโ returns a random number between 0 and the number givenirandโ returns a random integer between 0 and the number givenfactโ returns the factorial of a numberGammaโ returns the value of the Gamma function at that valuelnGammaโ returns the value of the log Gamma function at that valuezetaโ returns the value of the Riemann zeta function at that valuesincโ returns the sinc function (for sinus cardinalis) of the input, also known as the interpolation function, filtering function or the first spherical Bessel function, is the product of a sine function and a monotonically decreasing function ๐
๐ฎ CONSTANTS ๐ฎ
wcalc supports a LOT of constants. some are special (hi pi ๐), and some are just mathematical or physical constants that have been hardcoded in. the physics constants are taken from http://physics.nist.gov/constants, and should all be in predictable SI units ๐
the value of pi is special, because it is calculated to however many bits of precision have been specified with the \bits command. the default number of bits is 1024, or a value of:
3.14159265358979323846264338327950288419716939937
5105820974944592307816406286208998628034825342117
0679821480865132823066470938446095505822317253594
0812848111745028410270193852110555964462294895493
0381964428810975665933446128475648233786783165271
2019091456485669234603486104543266482133936072602
4914127372458699747248223615028234079551511205588
1168465696731309335738719301105597412739780116660
0823447367841524950037348489795545416453901986117
5727227318713884226435889742120217131949568051423
0839931356624755337162012934002605160185668467703
3122428187855479365508702723110143458240736806341
7989633389232864603510897727208179195996751333631
1014750579717366267579547177770281431880438556092
9672479177350549251018537674006123614790110383192
5028979233679937836193101666790131879693151725794
3860403036395703382632593537215128964016797694845
3904619615481368332936937026831888367580239969088
9326975278116532822249504103365733859441905164461
4642369403738060905908822203694572794411694624061
6684848934170304346480406820774078369140625
similarly, all values that rely on the value of pi, like mu0, have the same level of precision. and now, the complete list of the symbols used to represent the constants hardcoded into wcalc ๐ซถ
eโ The logarithm constant:2.718281828459045235360287471352662497757247093699959574966gammaโ Euler's Constant:0.57721566490153286060651209008240243104215933593992359880576723488486772677766467093694706329174674951463144724980708248096050401448654283622417399764492353625350033374293733773767394279259525824709491600873520394816567Kโ Catalan Constant:0.91596559417721901505460351493238411077414937428167213426649811962176301977625476947935651292611510624857442261919619957903589880332585905943159473748115840699533202877331946051903872747816408786590902gโ Acceleration due to gravity:9.80665 m/s/sCcโ Coulomb's Constant:8987551787.37
๐ Universal Constants ๐
Z0orZzeroโ Impedance of Vacuum:376.730313461 ohmsepsilon0orepsilonzeroโ Permittivity of Free Space:8.854187817e-12 F/mmu0ormuzeroโ Permeability of Free Space calculated as4*pi*10^-7Gโ Gravitational Constant:6.67259e-11hโ Planck Constant:6.6260755e-34cโ Speed of Light:299792458
โก Electromagnetic Constants โก
muBโ Bohr Magneton:5.78838174943e-11 J/TmuNโ Nuclear Magneton:3.15245123824e-14 J/TG0โ Conductance Quantum:7.748091733e-5 Secโ Elementary Charge:1.60217653e-19Kjโ Josephson Constant:483597.879e9 Hz/VRkโ Von Klitzing Constant:25812.807449 omega
๐ง Atomic and Nuclear Constants ๐ง
Malphaโ Alpha Particle Mass:6.6446565e-27 kga0โ Bohr Radius:5.291772108e-11 mMdโ Deuteron Mass:3.34358335e-27 kgMeโ Electron Mass:9.1093897e-31 kgreโ Electron Radius:2.817940325e-15 meVโ Electron Volt:1.602177250e-12 JGfโ Fermi Coupling Constant:1.16638e-5 GeV^-2alphaโ Fine Structure Constant:7.29735253327e-3ehโ Hartree Energy:4.35974417e-18 JMhโ Helion Mass:5.00641214e-27 kgMmuโ Muon Mass:1.88353140e-28 kgMnโ Neutron Mass:1.67492728e-27 kgMpโ Proton Mass:1.67262171e-27 kgRinfโ Rydberg Constant:10973731.568525 1/mMtโ Tau Mass:3.16777e-27 kg
๐งช Physio-Chemical Constants ๐งช
uโ Atomic Mass Constant:1.66053886e-27 kgNaorNAโ Avogadro's Constant:6.0221367e23kโ Boltzmann Constant:1.3806505e-23Fโ Faraday Constant:96485.3383 C/molc1โ First Radiation Constant:3.74177138e-16 W m^2n0ornzeroโ Loschmidt Constant:2.6867773e25 m^-3Rโ Molar Gas Constant:8.314472VmorNAkโ Molar Volume of Ideal Gas:22.413996e-3 (m^3)/molc2โ Second Radiation Constant:1.4387752e-2 m Ksigmaโ Stefan-Boltzmann Constant:5.670400e-8bโ Wien Displacement Law Constant:2.8977686e-3 m K
๐ฒ Random Constants ๐ฒ
randomโ A Random Valueirandomโ A Random Integer
๐ SPECIAL SYMBOLS ๐
there are some special symbols that wcalc accepts as input for compound operations. lowkey iconic of it:
@Inf@โ Symbol that represents Infinity@NaN@โ Symbol that represents "Not a Number"
not me casually handing you literal infinity and the void itself as valid inputs ๐ use responsibly bestie ๐
๐ COMMANDS ๐
okay so wcalc has a whole little command language, and bestie, you're gonna want to know all of it. These are the commands that are supported in wcalc. Periodt. โจ
\pXXXโ sets the precision, aka how many decimal places get displayed, to beXXX. This only changes the output, not the internal representation. If precision is-1, the number of decimal places shown depends on the value. Default is-1. ๐\eor\engor\engineeringโ rotates between always using scientific notation, never using scientific notation, and choosing to use scientific notation when it's convenient. You can also give it an argument that's one ofalways,never, orautomaticto pick a mode directly. ๐\helpor?โ displays a help screen. iconic. ๐\prefsโ prints out the current preference settings.\lior\listor\listvarsโ prints out the currently defined variables.\ror\radiansโ toggles between using and not using radians for trigonometric calculations.\consor\conservativeโ toggles accuracy guards. Here's the tea: because of the way floating point numbers are stored in computers, some numbers can't be represented exactly (like0.1). Because of that, calculating with those numbers can produce results that aren't exactly correct, but are off from the correct answer by a very small value (smaller than the floating point value can represent accurately). For example, the calculation of1-.9-.1can return an extremely small number that isn't zero but is less than what can be represented accurately, so for all intents and purposes it's0. The accuracy guard feature rounds numbers to zero if they're less than the representable accuracy of the floating point number. But sometimes numbers that small or smaller need to be displayed, so you should turn the accuracy guard off. Alternatively, you could increase the number of internal bits, which makes it possible to represent numbers with more accuracy. ๐ซถ\por\pickyor\lor\lenientโ toggles variable parsing rules. When wcalc is "picky", it complains if you use undefined variables. When it's "lenient", wcalc assumes a value of0for undefined variables. ๐\reor\rememberor\remember_errorsโ toggles whether or not expressions that produce errors are remembered in the history.\preor\prefixor\prefixesโ toggles the display of prefixes for hexadecimal, octal, and binary output.\bor\binor\binaryโ results are printed in binary (base 2). Numbers printed in binary have a prefix of0bunless the\prefixescommand is used.\dor\decor\decimalโ results are printed in decimal (base 10). This option is the default, and it doesn't have a default prefix to indicate that numbers are in base 10.\hor\xor\hexor\hexadecimalโ results are printed in hexadecimal (base 16). Numbers printed in hexadecimal have a prefix of0xunless the\prefixescommand is used.\oor\octor\octalโ results are printed in octal (base 8). Numbers printed in octal have a prefix of0unless the\prefixescommand is used.\round none|simple|sig_figโ wcalc can try to warn you when numbers have been rounded in the output display. It has two methods of keeping track: either by using significant figures (sig_fig), or by a simple digit-counting algorithm. Rounding in the command-line version is shown by a tilde before the equals sign (~=). Rounding in the GUI version is shown by changing the text color to red. In some cases, wcalc may think the number has been rounded even if it shouldn't have been necessary (this is because of the way floating point numbers are represented internally). ๐ญ\dsepXโ sets the decimal separator character to beX.\tsepXโ sets the thousands-place separator character to beX.\idsepXโ sets the input-only decimal separator character to beX.\itsepXโ sets the input-only thousands-place separator character to beX.\hlimitXโ sets the limit (X) on the length of the history.\open filename.txtโ loads filefilename.txt.\save filename.txtโ saves the current session and variable list to a file,filename.txt.\bitsXXXXโ sets the number of bits of precision that will be used to internally represent numbers to beXXXX. The default is1024. Set it higher if you need more precision, set it lower if you want to use less memory.\intsโ toggles whether long integers will be abbreviated or not. This conflicts with engineering notation for large numbers, but not for decimals.\prefsor\preferencesโ displays the current preference settings.\convert unit1 unit2โ converts the previous answer fromunit1tounit2.\store variablenameโ saves the specified variable in the preload file,~/.wcalc_preload\explain objectโ explains the specified object. The object can be a variable, constant, function, or command.\verboseโ verbose mode displays the expression to be calculated before calculating it.\delor\delimor\delimitersโ display delimiters in numerical output.\cmodโ toggle between C-style modulus operation and a more flexible method.\colorโ toggles the use of color in the commandline output.
๐ PREFERENCES ๐
okay so bestie, wcalc can remember your whole vibe between sessions if you want it to โ it just needs a little home for your settings, and that home is ~/.wcalcrc ๐
The format of the file is that each line is either blank or an assignment. Comments are ignored, and are defined as anything to the right of and including a hash mark (#). Assignments are of the form:
key=value
and here are literally all the keys you can use, no gatekeeping:
precisionโ a number that sets your display precision. It's the same energy as the\Pcommand, where-1means "auto" and anything else is however many decimal places you want. ๐ธ Heads up though: this does not touch the behind-the-scenes precision. It's purely a glow-up for the display.show_equalsโ either true ("yes"or"true") or false (anything else, which, rude, but okay). Same as the--quietargument. It decides whether your answers start with an equals sign or not.engineeringโ either"always","never", or"automatic". Same as the\engineeringcommand. Says whether answers show up in engineering notation or not.use_radiansโ either true ("yes"or"true") or false (anything else). Same as the\radianscommand. Tells your trig functions whether to take radians or degrees.print_prefixesโ either true ("yes"or"true") or false (anything else). Same as the\prefixescommand. Says whether base prefixes (like0xfor hex numbers, bestie) get used when showing output.save_errorsโ either true ("yes"or"true") or false (anything else). Same as the\remember_errorscommand. Says whether lines with a syntax error get added to the history or not. ๐precision_guardโ either true ("yes"or"true") or false (anything else). Same as the\conservativecommand. Says whether the display tries to eliminate numbers too small to be accurate (hopefully those are only errors made by the binary approximation of the inputs, not you being wrong ๐ ).print_integersโ either true ("yes"or"true") or false (anything else). Same as the\intscommand. Says whether whole integers get printed un-abbreviated or not. โ ๏ธ This conflicts with engineering notation for large integers โ but not for decimals, so no drama there.print_delimitersโ either true ("yes"or"true") or false (anything else). Same as the\delimiterscommand. Says whether delimiters get added to output when displaying.thousands_delimiterโ uses the next character after the equals sign as its value. Same as the\tsepcommand. Says what the thousands delimiter is, and it can affect output ifprint_delimitersis enabled.decimal_delimiterโ uses the next character after the equals sign as its value. Same as the\dsepcommand. Says what the decimal delimiter is.input_thousands_delimiterโ uses the next character after the equals sign as its value. Same as the\itsepcommand. Says what the input-only thousands delimiter is, and it cannot affect output.input_decimal_delimiterโ uses the next character after the equals sign as its value. Same as the\idsepcommand. Says what the input-only decimal delimiter is, and it cannot affect output.history_limitโ either"no", for no limit (living freely โจ), or a number. Same as the\hlimitcommand.output_formatโ eitherdecimal,octal,binary,hex, orhexadecimal.rounding_indicationโ eitherno,simple, orsig_fig. Same as the\roundingcommand.c_style_modโ either true ("yes"or"true") or false (anything else). Same as the\cmodcommand. Says whether the modulo operator (%) behaves like it does in the C programming language, or whether it uses a more flexible method. This only affects modulo operations where negative numbers are involved. fr fr, here's the receipts โ withc_style_modset to true (the default):
-340 % 60 == -40; 340 % -60 == 40; -340 % -60 == -40
However, with c_style_mod set to false:
-340 % 60 == -40; 340 % -60 == -20; -340 % -60 == 20
colorโ either true ("yes"or"true") or false (anything else). Same as the\colorcommand. Says whether the commandline interface uses color in its output or not. ๐
๐
colors[XXX] ๐
This one is for specifying the color of specific interface elements in the commandline interface โ the aesthetic customization, if you will. ๐
Valid colors are:
(bold)black(bold)red(bold)green(bold)yellow(bold)blue(bold)magenta(bold)cyan(bold)white
The XXX must be one of the following values:
conversion_categoryconversion_unitpromptapprox_answerexact_answererr_locationerr_textpref_namepref_valpref_cmdstatusvar_namevar_descsubvar_nameexplanation
๐ธ PRELOAD ๐ธ
Wcalc uses a file, ~/.wcalc_preload, to store persistent information between instances. Typically, this is used to store variables that are frequently defined โ your ride-or-die constants, basically. ๐ซถ
This file can be edited by hand with a standard text editor, no special tooling required. There's also a command within wcalc (\store) to append a variable definition to the end of this file. And here's the slay: any variable defined in this file is defined and available for use in any subsequent invocation of wcalc. โจ
๐ COPYRIGHT ๐
wcalc is Copyright (C) 2000-2014 Kyle Wheeler.
It is distributed under the GPL, version 2, or (at your option) any later version..
๐ฆ SUGGESTIONS AND BUG REPORTS ๐ฆ
Any bugs found should be reported to Kyle Wheeler at kyle-wcalc@memoryhole.net. Don't be shy bestie, he wants to know. ๐
okay that's genuinely the whole page, we ate and left no crumbs ๐ and that lil <pink>wcalc(1)</pink> footer stamp you'd normally see down at the bottom is just this manual page's source and version tag (plus its date) โ consider it the little signature on the masterpiece. go forth and compute, main character ๐
๐
๐ฆ where this page comes from
- debian bookworm: wcalc 2.5-3+b1 ยท GPL-2.0-or-later
- debian trixie: wcalc 2.5-3+b2 ยท GPL-2.0-or-later
- nixos 26.05: wcalc 2.5
- nixpkgs unstable: wcalc 2.5
- ubuntu jammy: wcalc 2.5-3build1 ยท GPL-2.0-or-later
- ubuntu noble: wcalc 2.5-3build3 ยท GPL-2.0-or-later
- ubuntu questing: wcalc 2.5-3build3
- ubuntu resolute: wcalc 2.5-3build4 ยท GPL-2.0-or-later
- ubuntu stonking: wcalc 2.5-3build4 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms