rarment's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
8 (0.01 per day)
Joined:
27-July 12
Profile Views:
1,526
Last Active:
User is offline Aug 31 2012 03:29 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   rarment has not set their status

Posts I've Made

  1. In Topic: Finding the cube root in Scheme

    Posted 31 Aug 2012

    View Postsepp2k, on 31 August 2012 - 02:10 AM, said:

    From your code it looks like you're trying to implement Newton's method and you don't know which value to use as the second argument to the improve function - is this correct¹? If so, do you know what the second value should be logically and you just don't know how to keep track of that value in the code or don't you fully understand Newton's method?


    Yes, I am trying to implement Newton's Method and I don't know what the second value should be and don't know how to keep track of the value.

    Quote

    In general you should think about what each variable in your code is supposed to represent and then make sure that you use that variable in that way. For example the n in cube-root is supposed to be the number whose cube root you're supposed to find, correct? And the value returned by improve is supposed to be an improved guess of what the cube root might be, right? And you're then passing that possible cube root as the new value of n - does that make sense?


    Yes, that all is correct and makes sense

    Quote

    Also your good-enough? function takes 2 arguments, but uses 3.


    I see that now. I was getting so frustrated and I guess I added a variable and just didn't fully understand what I was doing. I really am having a hard time with functional programming.

    Quote

    ¹ In the future it would help if you point these things out explicitly, so I don't have to guess based on the code.


    I will be more specific in the future, thank you!

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

rarment hasn't added any friends yet.

Comments

rarment has no profile comments yet. Why not say hello?