Jump to content

Sum of a series: Difference between revisions

add Fermat
(Changed code to avoid storing intermediate values in a sequence.)
(add Fermat)
Line 875:
1.6439345666815615
</lang>
 
=={{header|Fermat}}==
<lang fermat>Sigma<k=1,1000>[1/k^2]</lang>
{{out}}
<pre>
83545938483149689478187854264854884386044454314086472930763839512603803291207881839588904977469387999844962675327115010933 `
903589145654299730231109091124308462732153297321867661093162618281746011828755017021645889046777854795025297006943669294 `
330752479399654716368801794529682603741344724733173765262964463970763934463926259796895140901128384286333311745462863716 `
753134735154188954742414035836608258393970996630553795415075904205673610359458498106833291961256452756993199997231825920 `
203667952667546787052535763624910912251107083702817265087341966845358732584971361645348091123849687614886682117125784781 `
422103460192439394780707024963279033532646857677925648889105430050030795563141941157379481719403833258405980463950499887 `
302926152552848089894630843538497552630691676216896740675701385847032173192623833881016332493844186817408141003602396236 `
858699094240207812766449 / 50820720104325812617835292273000760481839790754374852703215456050992581046448162621598030244504097 `
240825920773913981926305208272518886258627010933716354037062979680120674828102224650586465553482032614190502746121717248 `
161892239954030493982549422690846180552358769564169076876408783086920322038142618269982747137757706040198826719424371333 `
781947889528085329853597116893889786983109597085041878513917342099206896166585859839289193299599163669641323895022932959 `
750057616390808553697984192067774252834860398458100840611325353202165675189472559524948330224159123505567527375848194800 `
452556940453530457590024173749704941834382709198515664897344438584947842793131829050180589581507273988682409028088248800 `
576590497216884808783192565859896957125449502802395453976401743504938336291933628859306247684023233969172475385327442707 `
968328512729836445886537101453118476390400000000; or 1.6439345666815598031390580238222155896521
</pre>
 
=={{header|Fish}}==
781

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.