E-Code

Ideal gas PV=nRT: leave one blank — a TI-89 Titanium program

By E-Code · updated

GAS89 is a TI-89 BASIC program for the TI-89 Titanium. Type three of pressure, volume (L), moles and temperature and leave the unknown BLANK; drop-downs pick atm, kPa or mmHg and kelvin or Celsius, and R is chosen to match (0.08206, 8.314 or 62.36).

What it asks for and what it shows

It asks for 4 values at its prompts, after you pick options 1, 2 from its menu. In the example below it shows P, V L, N MOL, T, T K, R.

Example run

One of its oracle test cases: “STP in atm and C: moles”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Menuoption 1
Menuoption 2
Input 11
Input 222.4
Input 3
Input 40
The screen shows
P=1
V L=22.4
N MOL=0.9993767493
T=0
T K=273.15
R=0.082057366

How it's checked

6 test cases, each checked against the textbook formula it uses. Replayed key by key on a virtual TI-89 Titanium, they make 43 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium chemistry programs · All TI-89 Titanium programs