100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Informatique - Les flottants $3.74
Add to cart

Class notes

Informatique - Les flottants

 256 views  1 purchase
  • Course
  • Institution

Cours de bases en algorithmique et programmation. Langage C.

Preview 1 out of 2  pages

  • September 13, 2014
  • 2
  • 2012/2013
  • Class notes
  • Unknown
  • All classes
avatar-seller
Chapitre 5 : Les flottants

Cours

Cf feuille

Exercices

1. Suites

fonction sin_n(x : flottant,(esp flottant) n : entier_nat) : flottant
var cumul : flottant :* stocke les sommes partielles*/
puissx : flottant /* stocke x^(2k+1) */
factk : flottant /* stocke (2k+1) ! */
moinsun : entier/* stocke (-1)^k */
k : entier_nat /* compte jusque n*/
erreur flottant /* estime l'erreur*/

|Début|
erreur:= eps+1 /* pour etre sur d'entrer dans la boucle*/
cumul:= 0
puissx:=x /* x^(2*0+1) */
factk:=1 /* (2*0+1) !*/
k:=0
moinsun:=1 /* (-1)^0 */

Pour k allant de 0 à n faire Tant que abs(erreur)> eps faire
cumul:= cumul +((moinsun*puissx)/factk)
erreur:= (puissx*x)/ (factk* ((2*k)+2))
moinsun:= moinsun * (-1)
puissx:= puissx*x*x
factk:= factk* ((2*k)+2)*((2*k)+3)
k:= k+1
Fin pour Fin tant que
retourner cumul

|Fin|

en : C

Double sin_n (double x, double esp unsigned int n)
{
double cumul ;
double puissx ;
unsigned int fact k ;
int moinsun ;
double erreur ;
unsigned int k ;
erreur= eps=1 ;
cumul = 0 ;

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Streamerine. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $3.74. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

52355 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$3.74  1x  sold
  • (0)
Add to cart
Added