Showing posts with label temperature. Show all posts
Showing posts with label temperature. Show all posts

Saturday, June 8, 2024

Casio fx-4000P - The Programs I took on Vacation

 Casio fx-4000P - The Programs I took on Vacation


I was on vacation in Atascadero last May 2024 at a car conference with my partner. I may not have classic cars, but I do have classic calculators. Here the programs I took with me in Casio fx-4000P.
I also took my HP 45 with me as well.


Total: 448 bytes out of 550 bytes ( ^ => x^y)


Prog 0: Quadratic Equation: Po Shen way: x^2 + B * x + C = 0, built for real roots (39 steps)


“ B “ : ? → B : “C” : ? → C : B² ÷ 4 – C → W ◢ -B ÷ 2 - √W ◢ Ans + 2 × √W


Prog 1: Law of Cosines - Side Z (45 steps)


Deg : “X” : ? → X : “Y” : ? → Y : “C” : ? → C : X² + Y² – 2 × X × Y × cos C : √Ans → Z


Prog 2: Law of Cosines - Angle C (49 steps)


Deg : “X” : ? → X : “Y” : ? → Y : “Z” : ? → Z : ( X² + Y² – Z² ) ÷ ( 2 × X × Y ) : cos^-1 Ans → C


Prog 3: Area of Triangle – Heron’s Formula (55 steps)


X” : ?→X : “Y” : ?→Y : “Z” : ?→Z : (X + Y + Z) ÷ 2→S : √( S×(S – X)×(S – Y)×(S – Z))


Prog 4: Speed of Sound in Dry Air (53 steps)

All constants, γ, R, M are taken care of in the formula, T = temp in °F

Conversions: 1 m/s = 2.236936 mph, 20.04503702 * 2.236936 = 44.83946493


T “ : ?→T : 5÷9 × (T – 32) + 273.15 : 20.04503702 * √Ans : 2.236936 * Ans → S


Prog 5: Horizontal Curve Analysis Given Central Angle and Radius (52 steps)

I = central angle, R = radius, L = arc length, C = chord length


Deg : “I” : ?→I : “R” : ?→R : “L=” ◢ π×R×I ÷ 180 → L ◢ “C=” ◢ 2×R× sin(I ÷ 2) → C


Prog 6: D = Displacement of a Cylinder (in) (36 steps)

B = bore (in), S = stroke (in), N = number of cylinders


“B” : ? → B : “S” : ? → S : “N” : ? → N : π × B² × S × N ÷ 4 → D


Prog 7: Tire Size (in) (36 steps)

S = section width (mm), A = aspect ratio, R = rim diameter (S, A, R → )


“S” : ? → S : “A” : ? → A : “R” : ? → R : S × A ÷ 1270 + R → T


Prog 8: Air Pressure for height up to 36,089 ft above sea level (inHg) (45 steps)

This is with constants already completed (g, M, R, etc.)


H” : ?→H : 29.92126 × (1 - 6.875 × 10^-6 × H) x^y 5.255876329 → P


Prog 9: Breaking Distance in Feet Given the Car’s Velocity in Miles Per Hour (35 steps)


V” : ? → V : V × 22 ÷ 15 : Ans × 1.5 + Ans² ÷ 45.04367 → D


Source:

“Breaking Distance” Wikipedia. Last Edited March 30, 2024. Accessed April 29, 2024.

https://en.wikipedia.org/wiki/Braking_distance


Hagberg Media AB. “Stopping distance = reca2tion distance + breaking distance” 2024.

Accessed April 29, 2024. https://korkortonline.se/en/theory/reaction-braking-stopping/


Just for fun,

Eddie


All original content copyright, © 2011-2024. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Sunday, October 8, 2023

TI-84 Plus CE: Using Matrices for "Tax Table" Calculations

TI-84 Plus CE:   Using Matrices for "Tax Table" Calculations


How The Matrix is Set Up


Each row represents a tier or a bracket.  


First column:  Lower Limit.  This is the test variable.  The first tier often will have the lower tier of 0.


Second and subsequent columns:    Variables that are associated with that tier.


Let's demonstrate this with an example.




Example Tax Bracket






This matrix has four brackets (four rows).  The algorithm starts with the last (bottom) row and tests whether the input is greater or equal to the test variable.  


According to the table, the tax rate changes at income level at $30,000, $90,000, and $270,000, with the top tax rate of 9% effective for all income excess of $270,000.


If the income is $29,999.99, the first tier of 3% is used.  If the income goes to $30,000.00, the next tier is activated.


The program ITAX, which uses this type of setup, goes "backwards".  It tests from the highest tier down.  


For example:  Income = $50,000


Start at tier 4 (bottom row). 

Is 50,000 > 270,000?  No, go to tier 3. (move one row up)

Is 50,000 > 90,000?  No, go to tier 2.  (move one row up) 

Is 50,000 > 30,000?  Yes, use the variables from tier 2.


Tax:  (50,000 - 30,000) × 5% + 900 = 20,000 × 5% + 900 = 1,900


Matrix wise:   (income - M[2,1]) * M[2,2] ÷ 100 + M[2,3]



Programs



There are two programs that illustrate this method:  


ITAX:  Income Tax Bracket.  Bracket is stored in Matrix [ A ] and has three columns:


Column 1:  lower limit of each bracket

Column 2:  tax rate for that bracket

Column 3:  additional "minimum" tax.   



BAROMET:  Calculates the air pressure and density based on height.  Scientific information is stored in Matrix [ J ].  


Column 1:  height in meters

Column 2:  mass density in kg/m^3

Column 3:  standard temperature in K

Column 4:  static pressure in Pa


If you are working in US Units, the height is converted to meters first.  After the calculation, the results are converted back into US units. 



You can download both programs here (zip file):  

https://drive.google.com/file/d/1ZCtMcJgZDLUGnrAHE6cPAkWBQQj1aHKc/view?usp=sharing



Source


"Barometric formula."  Wikipedia.  Last edited July 13, 2023.  Retrieved July 16, 2023.   https://en.wikipedia.org/wiki/Barometric_formula



Eddie



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Monday, August 5, 2019

TI-84 Plus CE and HP Prime: Calculating Color Temperature

TI-84 Plus CE and HP Prime:  Calculating Color Temperature

Introduction

We can estimate a color temperature for a given color.  However, the estimate is most useful when the color is close to white or the black body curve.  The color temperature, known as the CCT, is just one particular aspect of a color and its light quality. 

For more detailed information, please check the article by Waveform Lighting, https://www.waveformlighting.com/tech/calculate-color-temperature-cct-from-cie-1931-xy-coordinates.  The article will be listed in the Sources section at the end of this blog entry.

Calculation

The program RGBTEMP will estimate CCT from a color given its RGB (red-green-blue) coordinates. 

The calculation involves several steps:

1.  Scaling RGB values from a scale of 0-255 to 0-1.  This is accomplished by dividing each of the parameters of the color's RGB value by 255.  Standard RGB values (sRGB) are used. 

2.  The scaled RGB values will be converted to CIE 1931 XYZ color space values.  In 19031, the International Commission on Illumination created the CIE 1931 color space, designed to describe how the distribution of color wavelengths affect how colors are perceived.  The conversion is done in two parts.

2a.  Adjust each of the scaled RGB values to account for the gamma correction:

Let I be the scaled parameter for R, G, and B.  Then:

If I ≤ 0.04045, Then:

I_adj = I/12.92

Else:

I_adj = ( (I + 0.055) / 1.055) ^ 2.4

2b.  Calculate the XYZ values.   This can be accomplished by matrix multiplication:

[ [ X ] [ Y ] [ Z ] ] =

[[ 0.4124, 0.3576, 0.1805 ] [ 0.2126, 0.7152, 0.0722 ] [ 0.0193, 0.1192, 0.9504 ]]
*  [ [ R ] [ G ] [ B ] ]

3.  With the XYZ coordinates, calculate CIE Yxy coordinates.  Y is already done, so only (small) x and (small) y are needed:

x = X / (X + Y + Z)

y = Y / (X + Y + Z)

4.  Calculate the CCT.  There are several methods: one of them is a cubic approximation from Calvin McCamy:

n = (x - 0.3320) / (0.1858 - y)

CCT = 437 * n^3 + 3601 * n^2 + 6861 * n + 5517

CCT is in Kelvins.

TI-84 Plus Program RGBTEMP

"2019-07-11 EWS"
Disp "COLOR TEMP FROM RGB"
Input "RED   :",R
Input "GREEN :",G
Input "BLUE  :",B

[[R/255][G/255][B/255]]→[I]

For(I,1,3)
If [I](I,1)≤0.04045
Then
[I](I,1)/12.92→[I](I,1)
Else
(([I](I,1)+.055)/1.055)^2.4→[I](I,1)
End
End

[[.4124,.3576,.1805][.2126,.7152,.0722][.0193,.1192,.9504]]*[I]→[J]

[J](1,1)/([J](1,1)+[J](2,1)+[J](3,1))→X
[J](2,1)/([J](1,1)+[J](2,1)+[J](3,1))→Y

(X-.332)/(.1858-Y)→N
437*N^3+3601*N^2+6861*N+5517→C
Disp "CCT (K):",C

HP Prime Program RGBTEMP

The HP Prime version returns CCT, the XYZ coordinates, and the x and y parameters in a four element list.

EXPORT RGBTEMP(R,G,B)
BEGIN
// 2019-07-11 EWS
// RGB to color temperature
LOCAL M0,M1,X,Y,N,C;
LOCAL I,U,V,N,CCT;

// initialize
M0:=[[R/255],[G/255],[B/255]];

// correction
FOR I FROM 1 TO 3 DO
IF M0(I,1)≤0.04045 THEN
M0(I,1):=M0(I,1)/12.92;
ELSE
M0(I,1):=((M0(I,1)+0.055)
/1.055)^2.4;
END;
END;

// RGB to CIE XYZ 1931
M1:=[[0.4124,0.3576,0.1805],
[0.2126,0.7152,0.0722],
[0.0193,0.1192,0.9504]]*M0;

// XYZ to Yxy
X:=M1(1,1)/(M1(1,1)+M1(2,1)+
M1(3,1));
Y:=M1(2,1)/(M1(1,1)+M1(2,1)+
M1(3,1));

// xy to CCT (Kelvins)
// McCamy approximation
N:=(X-0.3320)/(.1858-Y);
C:=437*N^3+3601*N^2+6861*N+5517;

RETURN {C,M1,X,Y};

END;

Examples
(CCT rounded to four decimal places)

Remember the closer to the Black Body Curve, the more accurate the answer. 

Red:  RGB (255, 0, 0)
CCT:  3034.8988 K

Green:  RGB (0, 255, 0)
CCT:  6068.7576 K

Orange:  RGB (255, 165, 0)
CCT:  2429.5395 K

Sky Blue:  RGB (136, 206, 235)
CCT:  13207.1056 K

White:  RGB (255, 255, 255)
CCT:  6506.6551 K

Sources

"Convert color data into different standards and color spaces" and "Color math and programming code examples"   EASYRGB.  IRO Group Limited.  2019. https://www.easyrgb.com/en/convert.php  and https://www.easyrgb.com/en/math.php    Retrieved July 11, 2019

"Calculate color temperature (CCT) from CIE 1931 xy coordinates"  Waveform Lighting. 2019.  https://www.waveformlighting.com/tech/calculate-color-temperature-cct-from-cie-1931-xy-coordinates   Retrieved July 6, 2019

"sRGB"  Wikipedia.  Last edited May 18, 2019.  https://en.wikipedia.org/wiki/SRGB
Retrieved June 16, 2019.

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Monday, September 3, 2018

Estimating the Boiling Point at Various Elevations


Estimating the Boiling Point at Various Elevations

Equation

We can estimate the boiling point of water, accurate to the nearest tenth (one decimal point), by the formula:

y = 4.299969165*10^-8 * x^2 – 0.0035531324 * x + 100.0049216

Where:

x = elevation in meters
y = boiling point of water in degrees Celsius (°C)

This equation was derived using quadratic regression analysis of 27 sample points, testing points for elevations from -305 m to 6629 m.

If you are working with US units, you can use the following unit conversions:

1 ft = 0.3048 m

Conversion to Celsius:  °C = (°F – 32) * 5/9

Examples

x = -152 m (approx. -498.687664 ft), y ≈ 100.5 °C

x = 4115 m (13500.65617 ft), y ≈ 86.1 °C

x = 6325 m (20751.31234 ft), y ≈ 79.3°

Source:

Glover, Thomas J.  Pocket Ref 4th Edition.  Sequoia Publishing, Inc. Littleton, CO. 2012

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.

Thursday, January 4, 2018

HP Prime: Black Hole Characteristics – Hawking Radiation (updated 1/23/2018)

HP Prime:  Black Hole Characteristics – Hawking Radiation

Equations Used

Given the mass (either in kg or solar masses), the following equations can estimate these black hole characteristics:

Swartzchild Radius (in m): 
R = M * G/c^2

Life time left as the black hole slowly radiates (in s):
t = M^3 * 5120 * π * G^2 / (hbar * c^4)

The HP Prime uses the conversion for seconds to years:
1 year ≈ 31556925.9747 s

Average temperature of the black hole (K):
temp = (hbar * c^3)/(M * 8 * k * π * G)

If you need to convert to °C subtract 273.15 from this result.

Surface area of the black hole (m^2):
sa = (M^2 * 16 * π * G^2)/c^4

Surface gravity of the black hole (m/s^2), as you can imagine, this will be a huge number:
gr = c^4 / (M * 4 * G)

Constants Used

Values are taken from the HP Prime

Universal Gravitation Constant
G = 6.67384 * 10^-11 m^3/(kg * s^2)

Speed of Light
c = 299792458 m/s

Plank Constant Divided by 2*π
hbar = 1.054571726 * 10^-34 J*s

Boltzmann Constant
k = 1.3806488 * 10^-23 J/K



HP Prime Program BLACKHOLE

EXPORT BLACKHOLE()
BEGIN
// EWS 2018-01-04
// Hawking Radiation

// Input of mass
LOCAL ch,M;
INPUT({M,{ch,{"kg","Solar Mass"}}},
"Mass",{"Mass: ","Unit: "});

IF ch==2 THEN    
M:=1.988435ᴇ30*M;

END;

LOCAL k,G,c,hbar;
// from 4 Constants
// Shift, Units, Constant
k:=1.3806488ᴇ−23; // Chemistry
G:=6.67384ᴇ−11; // Physics
c:=299792458; // Physics
hbar:=1.054571726ᴇ−34; // Quantum

// Swartzchild radius (m)
LOCAL R:=(2*G*M)/c^2;

// Life (years)
LOCAL t:=M^3*5120*π*G^2/
(hbar*c^4*31556925.9747);

// Temperature (K)
LOCAL temp:=(hbar*c^3)/
(M*8*k*π*G);

// Surface Area (m^2)
LOCAL sa:=M^2*16*π*G^2/c^4;

// Gravity
LOCAL gr:=c^4/(4*G*M);

// Results
PRINT();
PRINT("Schwartzchild Radius:");
PRINT(R+" m");
PRINT("Life:");
PRINT(t+" years");
PRINT("Temperature:");
PRINT(temp+" K");
PRINT("Surface Area:");
PRINT(sa+" m^2");
PRINT("Surface Gravity:");
PRINT(gr+" m/s^2");


// List
RETURN {R,t,temp,sa,gr};
END;

Note:  (1/23/2018)

The line in red used to read IF ch:=2 THEN, this is an error on my part.  The above code is now correct. (Alternatively, IF ch=2 THEN also works) Much appreciation to hfw and Salvomic on HP Museum of Calculators for pointing this error to me!


Examples

Cygnus X-1:  14.8 solar masses

Schwartzchild Radius: 43705.6410566 m
Life:  6.79261706057 * 10^70 years
Temperature:  4.16932978074 * 10^-9 K  (near absolute zero, very cold!)
Surface Area:  24004068275.4 m^2
Surface Gravity: 1.02819127807 * 10^12 m/s^2

Sagittarius A*, the center of our Milky Way Galaxy:  4.31 million solar masses

Schwartzchild Radius: 12727791415.8 m
Life: 1.67758214773 * 10^87 years
Temperature: 1.43169560917 * 10^-14 K
Surface Area: 2.03571024785 * 10^21 m^2
Surface Gravity: 3530680.02679 m/s^2

Source:

Jim Wisniewski.  “Hawking Radition Calcualtor”  Xaonon.  January 3, 2017.  http://xaonon.dyndns.org/hawking/  Retrieved December 26, 2017

Eddie


This blog is property of Edward Shore, 2018.

Sunday, March 1, 2015

HP Prime and TI-84+: Saturation Vapor Pressure, Dew Point, Density Altitude (US Units)

HP Prime and TI-84+:  Saturation Vapor Pressure, Dew Point, Density Altitude (US Units)


The Program AIRUS uses US units as the inputs and outputs:

Input:
T = Temperature in Fahrenheit (°F)
B = Air Pressure in inHg (inches of Mercury)
H = Relative Humidity (%)

You can find these measurements on various weather websites.  Such websites are Accuweather (www.accuweather.com) and Weather Underground (www.wunderunderground.com). 

Output:
S = Saturated Water Vapor (psi)
A = Approximate Actual Density Altitude (DSI) (feet)*
X = Dew Point (°F)

*This is an approximation of density altitude, is an equivalent elevation where the standard atmosphere is met.  (per ICAO, 29.921 inHg, 59°F, 0% humidity).  Let me stress, the density altitude is an approximation.

A list consisting of temperature, air pressure, relative humidity, saturated water vapor, approximate DSI, and dew point is also returned to the home screen.

Equations Used:

Convert Temperature from Fahrenheit to Celsius:
C = (T-32)*5/9

Saturation Vapor Pressure (psi):
S=(610.78*10^((7.5*C)/(C+237.3)))/ 6894.757292318

Dew Point (°C):
W=237.3*V/(1-V) where:

V=(LN(H/100)+((17.27*C)/(237.3+C)))/17.27

Convert from Celsius to Fahrenheit:
X = W*9/5 + 32

Density Altitude (feet):
A=145442.1563*(1-((17.326*B)/(1.8*Z))^.235) where:

Z=(C+273.15)/(1-.378*Y/(33.8639*B))
Y=6.1078*10^((7.5*W)/(237.3+W))

  
HP Prime: AIRUS

EXPORT AIRUS()
BEGIN
// 2015-02-28 EWS
// U.S. Units

LOCAL t,b,h;
LOCAL c,s,d,p,a,v,w;
LOCAL x,y,z;

// Data
INPUT({t,b,h},
"Weather Data",
{"t :","b :","h :"},
{"Temperature (°F)",
"Pressure (inHg)",
"% Relative Humidity"});

// t to Celcius
c:=(t-32)*5/9;

// Saturation Vapor Pressure (Pa)
// wikipedia
s:=610.78*ALOG((7.5*c)/(c+237.3));
// to psi
s:=s/6894.757292318;


// Dew Point (°F)
// ag.arizona.edu
v:=(LN(h/100)+((17.27*c)/(237.3+c)))/17.27;
w:=237.3*v/(1-v);

// w to °F
x:=w*9/5+32;

// Density Altitude
// www.srh.noaa.gov
y:=6.1078*ALOG((7.5*w)/(237.3+w));
z:=(c+273.15)/(1-.378*y/(33.8639*b));
a:=145442.1563*(1-((17.326*b)/
(z*1.8))^.235);


// Output
PRINT();
PRINT("Input:");
PRINT(t+"°F, "+b+"inHg, "+h+"%");
PRINT("Output:");
PRINT("Sat. Water Vapor (psi): "+s);
PRINT("Approx. DSA (ft): "+a);
PRINT("Dew Point (°F): "+x);
RETURN {t,b,h,s,a,x};
END;


TI-84+ AIRUS:

Disp “T: TEMP °F”
Disp “B: PRESSURE (INHG)”
Disp “H: REL. HUMIDITY”
Prompt T,B,H
(T-32)*5/9→C
610.78*10^((7.5C)/(C+237.3))→S
S/6894.757292318→S
(ln(H/100)+((17.27C)/(237.3+C)))/17.27→V
237.3V/(1-V)→W
9W/5+32→X
6.1078*10^((7.5W)/(237.3+W))→Y
(C+273.15)/(1-.378Y/(33.8639B))→Z
145442.1563*(1-((17.326B)/(1.8Z))^.235)→A
Disp “SAT. WATER VAPOR (°F)”
Pause S
Disp “APPROX DSA (FT)”
Pause A
Disp “DEW POINT (°F)”
Pause X
Disp {T,B,H,S,A,X}


Example:

Input:
T = 68°F
B = 29.94 inHg (inches of Mercury)
H = 70%

Output:
S = 0.339111794 psi
A = 790.3879774 feet
W = 57.85583006 °F


Sources:

“Density Altitude” National Weather Resource: Southern Region Headquarters  URL:  http://www.srh.noaa.gov/images/epz/wxcalc/densityAltitude.pdf   Retrieved February 28, 2015

“Density of Air” and “Density Altitude” Wikipedia.  URL:  http://en.wikipedia.org/wiki/Density_of_air , http://en.wikipedia.org/wiki/Density_altitude  Retrieved February 26, 2015

“Dewpoint Formulas” University of Arizona.  URL: http://ag.arizona.edu/azmet/dewpoint.html  Retrieved February 28, 2015

Glover, Thomas J.  “Pocket Ref”  4th Editiion.  Sequoia Publishing, Inc.:  Littleton, CO.  2012  Print
  

This blog is property of Edward Shore - 2015




Wednesday, June 11, 2014

HP 50g and TI-84+: Dew Point and Relative Humidity

Dew Point and Relative Humidity

This blog entry has programs for the HP 50g and TI-84+. RELHUMID is finding the relative humidity given actual temperature and dew point (both in °F).

Source: Michael Bell
"How do I calculate dew point when I know the temperature and relative humidity?"
Retrieve 6/10/2014
http://iridl.ldeo.columbia.edu/dochelp/QA/Basic/dewpoint.html

Relative Humidity

RH = E/Es (* 100%)

Clausius-Clapeyron Equations

Vapor Pressure:
E = 611 * e^(5423 * (1/273 - 1/Td)) [Pascal]
Saturation Pressure (Maximum):
Es = 611 * e^(5423 * (1/273 - 1/T)) [Pascal]

611: reference pressure
5423: L/Rv = ΔH/R; enthalpy of vapor water/Universal Gas Constant
R = 8.31452 J/(gmol K)
273 K: reference vapor pressure (at 0°K)

T = actual temperature
Td = Dew Point
RH = relative humidity

Temperature is in Kelvin

Kelvin to Fahrenheit
K = 5/9 * (F - 32) + 273.15

Equations and Programs:

Given T and Td, find RH

T and Td are in Kelvins

°F to °K: K = 5/9 * (F - 32) + 273.15

Derivation:
RH = E / Es
RH = [611*e^(5423*(1/273-1/Td))] / [611*e^(5423*(1/273-1/T))]
RH = [e^(5423*(1/273-1/Td))] / [e^(5423*(1/273-1/T))]
RH = e^( 5423 * (1/273 - 1/Td - 1/273 + 1/T ) )
RH = e^( 5423 * (1/T - 1/Td) )

Example:
Given T = 62.2°F and Td = 61°F, RH ≈ 95.7807%

Programs

RELHUMID - HP 50g:
Input: T on level 2, Td on level 1
<< 2 →LIST 1_°F * 1_K CONVERT
UVAL INV OBJ→ DUP - 5423 * EXP
100 * "Humidity (%)" →TAG >>


RELHUMID - TI-84+:
: Input "TEMP (°F):", T
: Input "DEW PT:", D
: 5/9 * (T - 32) + 273.15 → T
: 5/9 * (D - 32) + 273.15 → D
: e^( 5423( T⁻¹ - D⁻¹ → R
: 100R → R
: Disp "HUMIDITY:", R


T (in °K) and RH (in decimal), find Td

Derivation:
Es * RH = E
611 * e^(5423*(1/273-1/T)) * RH = 611 * e^(5423*(1/273-1/Td))
e^(5423*(1/273-1/T)) * RH = e^(5423*(1/273-1/Td))
5423*(1/273-1/T) + ln RH = 5423*(1/273-1/Td))
(1/273 - 1/T) + ln RH/5423 = 1/273 - 1/Td
-1/T + ln RH/5423 = -1/Td
1/Td = 1/T - ln RH/5423
Td = 1/( 1/T - ln RH/5423) = (1/T - ln RH/5423)^(-1)

°K to °F: F = 9/5 * K - 459.67

Example:

Given: T = 91°F and RH = 23%, Td ≈ 48.8400 °F

Programs:

DEWPOINT - HP 50g
Input: T on level 2, RH on level 1
<< 1 % LN 5423 / NEG
SWAP 1_°F * 1_K CONVERT UVAL INV
+ INV 1_K * 1_°F CONVERT "Dew Point" →TAG >>


DEWPOINT - TI-84+
: Input "TEMP (°F):", T
: Input "HUMIDITY", R
: R/100 → R
: 5/9 * (T - 32) + 273.15 → T
: (-ln(R)/5423 + T⁻¹ )⁻¹ → D
: 9/5 * D - 459.67 → D
: Disp "DEW PT.", D



Hope this is helpful. I am grateful for the many compliments. Talk to you next time, Eddie


This blog is property of Edward Shore. 2014

RPN: DM32 and DM42: Stopping Sight Distance (Metric)

RPN: DM32 and DM42: Stopping Sight Distance (Metric) The Stopping Sight Distance Formula – Derivation The stopping sight di...