Thanks to Tony Hutchins for the idea of using an intermediate variable and nesting divisions.
This Black-Scholes formula relies on a 5th order polynomial approximation. The worst case scenario, given below, is till accurate to 5 decimal places.
Enter PS, PE, RF%, S, T, then "MORE", then "SOLVE", then "CALLV", and if needed, "PUTV"
I had stopped working on this, waiting for the new 17bII+ ROM. But now that we know L() and G() don't work, I decided I should post this for anyone who wants a relatively accurate and fast Black-Scholes.
I'll post another VERY accurate version using Taylor series, as suggested by Tizedes Csaba. But that version is VERY VERY SLOW. Takes over a minute to execute.
PS=68
PE=29
Rf%=.5
T=6
S=.2054
Exact Call = 40.2016616074
Formula = 40.2016671122
Exact Put = .344582080329
Formula = .3445875851Abramowitz and Stegun 7.1.26 HP17BII+
Character Count: 679
BLK.SCHLS.5TH.SOLVE:
0×(PS+PE+RF%+T+S)
+IF(S(SOLVE):(LN(PS÷PE)+(RF%÷100+S^2÷2)×T)÷S÷SQRT(T)-SOLVE:
IF(S(CALLV):
PS×ABS(
IF(SOLVE<0:0:-1)
+((((1.061405429
÷(1+.2316419×ABS(SOLVE))-1.453152027)
÷(1+.2316419×ABS(SOLVE))+1.421413741)
÷(1+.2316419×ABS(SOLVE))-.284496736)
÷(1+.2316419×ABS(SOLVE))+.254829592)
÷(1+.2316419×ABS(SOLVE))
×EXP(-(SOLVE^2)÷2)÷2)
–PE×EXP(-RF%×T÷100)×ABS(
IF(SOLVE-S×SQRT(T)<0:0:-1)
+((((1.061405429
÷(1+.2316419×ABS(SOLVE-S×SQRT(T)))-1.453152027)
÷(1+.2316419×ABS(SOLVE-S×SQRT(T)))+1.421413741)
÷(1+.2316419×ABS(SOLVE-S×SQRT(T)))-.284496736)
÷(1+.2316419×ABS(SOLVE-S×SQRT(T)))+.254829592)
÷(1+.2316419×ABS(SOLVE-S×SQRT(T)))
×EXP(-((SOLVE-S×SQRT(T))^2)÷2)÷2)
-CALLV:
-PS+PE×EXP(-RF%×T÷100)+CALLV-PUTV))