Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91563505
series.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 12, 06:12
Size
601 B
Mime Type
text/x-c++
Expires
Thu, Nov 14, 06:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22283836
Attached To
R9490 Homework_sp4e_Peruzzo_SáezUribe
series.h
View Options
//
// Homework 2
// 2019
// CP & ASU
//
#ifndef HOMEWORK2_SERIES_H
#define HOMEWORK2_SERIES_H
#include <cmath>
class
Series
{
public:
virtual
double
compute
(
unsigned
int
N
)
=
0
;
virtual
double
getAnalyticPrediction
()
{
static
const
char
*
str2
=
"1"
;
return
std
::
nan
(
str2
);
};
protected:
double
sn
=
0
;
};
class
ComputeArithmetic
:
public
Series
{
public:
double
compute
(
unsigned
int
N
)
override
;
};
class
ComputePi
:
public
Series
{
public:
double
compute
(
unsigned
int
N
)
override
;
double
getAnalyticPrediction
()
override
;
};
#endif
//HOMEWORK2_SERIES_H
Event Timeline
Log In to Comment