RosettaCodeData/Task/Pathological-floating-point-problems/Stata/pathological-floating-point-problems-1.stata

10 lines
194 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
clear
set obs 100
gen n=_n
gen v=.
replace v=2 in 1
replace v=-4 in 2
replace v=111-1130/v[_n-1]+3000/(v[_n-1]*v[_n-2]) in 3/l
format %20.16f v
list if inlist(n,3,4,5,6,7,8,20,30,50,100), noobs