fp_iter1
ans =
1.5
-0.875
6.732421875
-469.720012001693
102754555.187385
-1.08493387053175e+24
1.27705559144438e+72
-2.08271290858103e+216
NaN
fp_iter2
ans =
1.5
1.28695376762338
1.40254080353958
1.34545837402329
1.37517025281604
1.36009419276173
1.36784696759213
1.36388700388402
1.36591673339004
1.36487821719368
1.36541006116996
1.36513782066921
1.36527720852448
1.36520585029705
1.36524238371884
1.36522368022528
1.3652332557425
1.36522835346263
1.36523086324364
1.36522957833396
1.36523023615818
1.36522989937773
1.36523007179629
1.36522998352467
1.36523002871632
1.36523000557995
1.36523001742488
1.36523001136073
1.36523001446534
1.3652300128759
1.36523001368963
fp_iter3
{Warning: Imaginary parts of complex
X and/or Y arguments ignored}
> In fp_iter3 at 6
{??? Operation terminated by user
during ==> inlineeval at 13
fp_iter3
{Warning: Imaginary parts of complex
X and/or Y arguments ignored}
> In fp_iter3 at 6
ans =
1.5
0.816496580927726
2.99690880578722
0 + 2.94123506147697i
2.7536223884358 - 2.7536223884358i
1.8149915190343 + 3.5345287899111i
2.38426584828215 - 3.43438806399137i
2.18277190004049 + 3.59687922821261i
2.29699758691958 - 3.5741044617663i
2.25651028617868 + 3.60656121990802i
2.27917904904579 - 3.60193657266051i
2.27114258664458 + 3.60837147007804i
2.27563131140716 - 3.6074516211228i
2.27403992715548 + 3.60872556687771i
2.27492836237414 - 3.60854334408709i
2.27461338398065 + 3.60879548114993i
2.27478921296336 - 3.60875941139254i
2.27472687594346 + 3.60880931110157i
2.27476167340962 - 3.60880217246316i
2.27474933658735 + 3.60881204785879i
2.27475622316243 - 3.60881063508048i
2.27475378164968 + 3.6088125894651i
2.27475514453294 - 3.60881230986973i
2.27475466134691 + 3.60881269665095i
2.27475493106742 - 3.6088126413178i
2.27475483544281 + 3.60881271786348i
2.27475488882166 - 3.60881270691281i
2.27475486989714 + 3.60881272206153i
2.27475488046105 - 3.60881271989434i
2.2747548767158 + 3.60881272289234i
2.27475487880644 - 3.60881272246345i
2.27475487806524 + 3.60881272305676i
2.27475487847899 - 3.60881272297188i
2.2747548783323 + 3.6088127230893i
2.27475487841419 - 3.6088127230725i
2.27475487838516 + 3.60881272309574i
2.27475487840136 - 3.60881272309242i
2.27475487839562 + 3.60881272309702i
2.27475487839882 - 3.60881272309636i
2.27475487839769 + 3.60881272309727i
2.27475487839832 - 3.60881272309714i
2.2747548783981 + 3.60881272309732i
2.27475487839822 - 3.60881272309729i
2.27475487839818 + 3.60881272309733i
2.2747548783982 - 3.60881272309732i
2.27475487839819 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
2.2747548783982 - 3.60881272309733i
2.2747548783982 + 3.60881272309733i
fp_iter4
ans =
1.5
1.34839972492648
1.36737637199128
1.36495701540249
1.36526474811344
1.36522559416052
1.36523057567343
1.36522994187818
1.36523002251557
1.36523001225612
1.36523001356143
1.36523001339535
fp_iter5
ans =
1.5
1.37333333333333
1.36526201487463
1.36523001391615
1.3652300134141
s=fp_iter_func('sqrt(10/(4+x))',1.5,1e-9)
s =
1.5
1.34839972492648
1.36737637199128
1.36495701540249
1.36526474811344
1.36522559416052
1.36523057567343
1.36522994187818
1.36523002251557
1.36523001225612
1.36523001356143
1.36523001339535
s=bisect('x^2-10',3,4,1e-14)
s =
3.5
3.25
3.125
3.1875
3.15625
3.171875
3.1640625
3.16015625
3.162109375
3.1630859375
3.16259765625
3.162353515625
3.1622314453125
3.16229248046875
3.16226196289062
3.16227722167969
3.16228485107422
3.16228103637695
3.16227912902832
3.162278175354
3.16227769851685
3.16227746009827
3.16227757930756
3.1622776389122
3.16227766871452
3.16227765381336
3.16227766126394
3.16227765753865
3.1622776594013
3.16227766033262
3.16227765986696
3.16227766009979
3.1622776602162
3.162277660158
3.1622776601871
3.16227766017255
3.16227766016527
3.16227766016891
3.16227766016709
3.162277660168
3.16227766016846
3.16227766016823
3.16227766016834
3.1622776601684
3.16227766016837
3.16227766016839
3.16227766016838
length(s)
ans =
47
s=bisect('x^3+4*x^2-10',1,2,1e-14)
s =
1.5
1.25
1.375
1.3125
1.34375
1.359375
1.3671875
1.36328125
1.365234375
1.3642578125
1.36474609375
1.364990234375
1.3651123046875
1.36517333984375
1.36520385742188
1.36521911621094
1.36522674560547
1.36523056030273
1.3652286529541
1.36522960662842
1.36523008346558
1.365229845047
1.36522996425629
1.36523002386093
1.36522999405861
1.36523000895977
1.36523001641035
1.36523001268506
1.36523001454771
1.36523001361638
1.36523001315072
1.36523001338355
1.36523001349997
1.36523001344176
1.36523001341266
1.36523001342721
1.36523001341993
1.36523001341629
1.36523001341448
1.36523001341357
1.36523001341402
1.36523001341425
1.36523001341413
1.36523001341408
1.36523001341411
1.36523001341409
1.3652300134141
length(s)
ans =
47
s=bisect('exp(x)-tan(x)',-4,-2,1e-14)
s =
-3
-3.5
-3.25
-3.125
-3.0625
-3.09375
-3.109375
-3.1015625
-3.09765625
-3.095703125
-3.0966796875
-3.09619140625
-3.096435546875
-3.0963134765625
-3.09637451171875
-3.09640502929688
-3.09642028808594
-3.09641265869141
-3.09640884399414
-3.09641075134277
-3.09641170501709
-3.09641218185425
-3.09641242027283
-3.09641230106354
-3.09641236066818
-3.09641233086586
-3.0964123159647
-3.09641230851412
-3.09641230478883
-3.09641230665147
-3.09641230572015
-3.09641230525449
-3.09641230502166
-3.09641230490524
-3.09641230496345
-3.09641230493435
-3.0964123049198
-3.09641230491252
-3.09641230491616
-3.09641230491434
-3.09641230491343
-3.09641230491388
-3.09641230491366
-3.09641230491354
-3.0964123049136
-3.09641230491363
-3.09641230491364
-3.09641230491365
length(s)
ans =
48