fib

Generates the nth value in the Fibonacci sequence. Considers 0 the 1st value, 1 the 2nd value, 1 the 3rd value, etc. Limit is n=1475

Privateunrated

Content

12 lines
{=(raw):{args}}
{=(test1):{m:trunc({raw}/1)}}
{=(test2):{m:{raw}/1}}
{=(num):{if({contains({raw}):{test1} {test2}}==true):{raw}|error}}
{break({num}==error):That's not a number.}

{=(base):(1/(5^0.5))}
{=(Phi):((1+(5^0.5))/2)}
{=(phi):((1-(5^0.5))/2)}

{=(fib):{m:trunc({base}*(({Phi}^({num}-1))-({phi}^({num}-1))))}}
The {ord:{num}} value in the Fibonacci sequence is: {fib}
Raw JSON
{
  "id": 78453,
  "created_at": "2019-10-09T21:18:00.000Z",
  "tag_name": "fib",
  "nsfw": false,
  "owner_id": "129419437911572480",
  "uses": 29,
  "description": "Generates the nth value in the Fibonacci sequence. Considers 0 the 1st value, 1 the 2nd value, 1 the 3rd value, etc. Limit is n=1475",
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "518252334975811604",
  "sharer": "129419437911572480",
  "content": "{=(raw):{args}}\n{=(test1):{m:trunc({raw}/1)}}\n{=(test2):{m:{raw}/1}}\n{=(num):{if({contains({raw}):{test1} {test2}}==true):{raw}|error}}\n{break({num}==error):That's not a number.}\n\n{=(base):(1/(5^0.5))}\n{=(Phi):((1+(5^0.5))/2)}\n{=(phi):((1-(5^0.5))/2)}\n\n{=(fib):{m:trunc({base}*(({Phi}^({num}-1))-({phi}^({num}-1))))}}\nThe {ord:{num}} value in the Fibonacci sequence is: {fib}",
  "embed": "{}",
  "last_fetched": "2026-10-20T20:37:50.617Z"
}