Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Maths with notepad

  • 18-02-2016 11:48PM
    #1
    Site Banned Posts: 20


    >open notepad
    >type x=
    >replace x with ((x+2/x)/2) 7 times
    >replace x with 1
    >copy whole text and paste into calculator

    Edit: Make sure you use "replace all".


Comments

  • Site Banned Posts: 20 Oros


    Anyone got any more? Can you calculate pi like this?


  • Site Banned Posts: 20 Oros


    This works in windows calculator set to radians.

    >type x=
    >replace x with (x+xs) 5 times or more
    >replace x with 1
    >paste into calculator


  • Registered Users, Registered Users 2 Posts: 78,841 ✭✭✭✭Victor


    Oros wrote: »
    >open notepad
    >type x=
    >replace x with ((x+2/x)/2) 7 times
    >replace x with 1
    >copy whole text and paste into calculator


    If I use 'replace', I'm getting:
    ((((((1+2/1)/2)+2/((1+2/1)/2))/2)+2/((((1+2/1)/2)+2/((1+2/1)/2))/2))/2)=0.8359375

    If I use 'replace all', I'm getting
    ((((((((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2)+2/((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2))/2)+2/((((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2)+2/((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2))/2))/2)+2/((((((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2)+2/((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2))/2)+2/((((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2)+2/((((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2)+2/((((((x+2/x)/2)+2/((x+2/x)/2))/2)+2/((((x+2/x)/2)+2/((x+2/x)/2))/2))/2))/2))/2))/2))/2)=0.010075192...

    What am I missing?


  • Site Banned Posts: 20 Oros


    Yeah, use replace all. In the last attempt you haven't replaced x with 1.


  • Registered Users, Registered Users 2 Posts: 78,841 ✭✭✭✭Victor


    Oros wrote: »
    Yeah, use replace all. In the last attempt you haven't replaced x with 1.

    You're right. :embarrassed:

    0.05314798...?


  • Advertisement
  • Site Banned Posts: 20 Oros


    Strange. What calculator are you using? It works ok with windows calculator.

    Maybe you need some extra parentheses. Try using ((x+(2/x))/2).


  • Registered Users, Registered Users 2 Posts: 78,841 ✭✭✭✭Victor


    calc.exe - the default calculator in Windows 7.

    What is the actual formula?


  • Site Banned Posts: 20 Oros


    I'm using win7 calculator too. This is what should happen:

    img.ie/images/2016/02/19/b525eefb0af5bbe3413613c2c17b0ca0.png


  • Site Banned Posts: 20 Oros


    This one's golden.

    start: x=
    replace term: (1+1/x)
    iterations: 15
    start value: 1


  • Registered Users, Registered Users 2 Posts: 78,841 ✭✭✭✭Victor


    Oros wrote: »
    This one's golden.

    start: x=
    replace term: (1+1/x)
    iterations: 15
    start value: 1
    16?


  • Advertisement
  • Site Banned Posts: 20 Oros


    I dunno wtf you're doing wrong, m8.


  • Site Banned Posts: 20 Oros


    Have you got your replace function in regex mode?


Advertisement