/script>
[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

basic programing

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 2

File: Calculus_Integration_03.png (16KB, 591x294px) Image search: [Google]
Calculus_Integration_03.png
16KB, 591x294px
Guys, few days back some anon posted an programming exercise that was like "if a snail goes up in a wall, and every new day goes up 0.9 times the last trip, plus every night goes down 20 cms, create a script that tells how much climb in N days" or something like that.
What was the answer? and do you guys have more exercises of that type??
>>
>>59560378

In which coding language do you want the exercises?
>>
>>59560378
How much does it go up the first day?
>>
>>59560468
First day was 1 meter I believe
>>
>>59560491

If you want the answer you better give all the details that were in the exercises...
>>
>>59560535
I'm not the OP, I just remember that thread...
>>
dn = o.9^n * d0 - 20*(0.9^(n-1)+0.9^(n-2)+......0.9^1+1)
>>
>multiply f(x) and dx
>implying dx is something you can multiply and not just notation
Fucking engineers
>>
>>59560705
You made that whole post just to be retarded
>>
>>59560378

>riemann, not lebesgue

Eww..

By the way, it's more a mathematical problem here:

f(n+1) = 0.9 * f(n) - 20

But you didn't tell how much the snail goes up on day 1, so it's impossible to solve.
>>
float snail_climb(int n){
if(n == 0){
return 1.0f;
}
float height;
float last = 1.0f;
float temp;
for(int i = 0; i < n; i++){
height = 0.0f;
height += (last*0.9f);
height -= 0.2f;
last = height;
}
return height;
}
>>
>>59560705
>>implying dx is something you can multiply and not just notation

I would recommend learning about the difference between "standard analysis" and "nonstandard analysis".

In "standard analysis", dy/dx is considered to be monolithic notation, with no implication of division, and no formal definition given for the stand-alone objects dy or dx. That's because standard analysis tries as much as possible to stay entirely within the confines of the real (or complex) number system -- and neither dx nor dy represent a real (or complex) number. Nevertheless, teachers of standard analysis often encourage students to imagine differentials as stand-alone mathematical objects in order to get a better intuitive understanding of them.

In "nonstandard analysis", dy/dx is interpreted as the division of the stand-alone objects dy and dx, which are defined to be "non-zero infinitesimals" -- and then the concept of "infinitesimal" is precisely defined by extending the real number system to create the "hyperreal" number system. Nonstandard analysis was invented, in part, to help formalize a more intuitive notation of calculus -- that is, of dy/dx actually representing the division of well-defined mathematical objects.

Although somewhat controversial when it was introduced in the 1960s, nonstandard analysis is now considered to be on an equally firm theoretical footing as standard analysis.

Standard analysis is by far the dominant approach in the educational system. That's because standard analysis does not require the extra time to define the hyperreal number system and its operators. Omitting hyperreals can shave off a a significant amount of time from the curriculum -- and given the precious little time teachers are allocated, they usually choose standard analysis because of its quick "hand-waving" approach to differentials.

You were on the receiving end of that "hand-waving" approach to differentials, which is why you have the viewpoint that you do about them.
>>
>>59560378
>if a snail goes up in a wall,

Here's your thread
>>59527079
>>
>>59562087
thaaaaank youu !
>>59560397
in PSeint, its just pseudocode, its more for learning about algoritms and programming sequences.
>>59560468
Its goes 1 meter up the first day!
>>59560669
Yes, i actually use an simple mathematical serie, (0.9^n), where n where the days minus one.

///

However, do you guys have more "algoritm" problems in that style??
>>
File: images (8).jpg (19KB, 428x344px) Image search: [Google]
images (8).jpg
19KB, 428x344px
I found integrals really hard at school, am I alone in this?
>>
>>59562403
You're welcome.

>more "algoritm" problems

I've been programming since 1979 - that kind of algorithm problem is not, very generally speaking, something you'd find in a programming context. As a programmer (and I've worked both in games and finance industry) that algorithm is something a programmer would expect to have already solved for him by someone with specific domain experience. Chances are the original OP was getting his chain yanked by a mathematician who thinks programming is somehow their field - there's a few who inhabit /g/.

However if you enjoyed that specific kind, you would probably do better to look around in other fields - especially mathematics - for these kinds of problems. https://projecteuler.net for a start.

Programming /qua programming/ problems look much more like FizzBuzz. Google up "fizzbuzz alternatives"
>>
>>59562622
You probably had a shitty teacher. Pick up a book like "Calculus for the Practical Man" and give it a read (you can find it for free online). If you self motivate your education, you'll find that things come easier and are memorized for longer.
>>
>>59562635
>https://projecteuler.net
thankyou anon ;^)
Thread posts: 18
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.