Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gnumeric
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
368
Issues
368
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnumeric
Commits
42dcee5a
Commit
42dcee5a
authored
Jul 16, 2002
by
Morten Welinder
Committed by
Morten Welinder
Jul 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use powgnum, not pow.
2002-07-16 Morten Welinder <terra@diku.dk> * sc-fin.c: Use powgnum, not pow.
parent
a3f72aaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
plugins/fn-financial/ChangeLog
plugins/fn-financial/ChangeLog
+4
-0
plugins/fn-financial/sc-fin.c
plugins/fn-financial/sc-fin.c
+7
-7
No files found.
plugins/fn-financial/ChangeLog
View file @
42dcee5a
2002-07-16 Morten Welinder <terra@diku.dk>
* sc-fin.c: Use powgnum, not pow.
2002-07-13 Jody Goldberg <jody@gnome.org>
* functions.c (gnumeric_price) : silence some warnings.
...
...
plugins/fn-financial/sc-fin.c
View file @
42dcee5a
...
...
@@ -170,7 +170,7 @@ GetRmz ( gnum_float fZins, gnum_float fZzr, gnum_float fBw, gnum_float fZw,
if
(
fZins
==
0
.
0
)
fRmz
=
(
fBw
+
fZw
)
/
fZzr
;
else
{
gnum_float
fTerm
=
pow
(
1
.
0
+
fZins
,
fZzr
);
gnum_float
fTerm
=
pow
gnum
(
1
.
0
+
fZins
,
fZzr
);
if
(
nF
>
0
)
fRmz
=
(
fZw
*
fZins
/
(
fTerm
-
1
.
0
)
+
fBw
*
fZins
/
(
1
.
0
-
1
.
0
/
fTerm
)
)
/
(
1
.
0
+
fZins
);
...
...
@@ -191,7 +191,7 @@ GetZw ( gnum_float fZins, gnum_float fZzr, gnum_float fRmz, gnum_float fBw,
if
(
fZins
==
0
.
0
)
fZw
=
fBw
+
fRmz
*
fZzr
;
else
{
gnum_float
fTerm
=
pow
(
1
.
0
+
fZins
,
fZzr
);
gnum_float
fTerm
=
pow
gnum
(
1
.
0
+
fZins
,
fZzr
);
if
(
nF
>
0
)
fZw
=
fBw
*
fTerm
+
fRmz
*
(
1
.
0
+
fZins
)
*
(
fTerm
-
1
.
0
)
/
fZins
;
...
...
@@ -217,14 +217,14 @@ Duration (GDate *nSettle, GDate *nMat, gnum_float fCoup, gnum_float fYield,
fYield
+=
1
.
0
;
for
(
t
=
1
.
0
;
t
<
fNumOfCoups
;
t
++
)
fDur
+=
t
*
(
fCoup
)
/
pow
(
fYield
,
t
);
fDur
+=
t
*
(
fCoup
)
/
pow
gnum
(
fYield
,
t
);
fDur
+=
fNumOfCoups
*
(
fCoup
+
f100
)
/
pow
(
fYield
,
fNumOfCoups
);
fDur
+=
fNumOfCoups
*
(
fCoup
+
f100
)
/
pow
gnum
(
fYield
,
fNumOfCoups
);
for
(
t
=
1
.
0
;
t
<
fNumOfCoups
;
t
++
)
p
+=
fCoup
/
pow
(
fYield
,
t
);
p
+=
fCoup
/
pow
gnum
(
fYield
,
t
);
p
+=
(
fCoup
+
f100
)
/
pow
(
fYield
,
fNumOfCoups
);
p
+=
(
fCoup
+
f100
)
/
pow
gnum
(
fYield
,
fNumOfCoups
);
fDur
/=
p
;
fDur
/=
(
gnum_float
)
nFreq
;
...
...
@@ -316,7 +316,7 @@ Value * get_yielddisc (GDate *nSettle, GDate *nMat, gnum_float fPrice,
/* FIXME: I think this is bogus stuff. */
fRet
/=
GetYearFrac
(
nSettle
,
nMat
,
nBase
);
fRet
/=
0
.
99795
;
/* don't know what this constant means in original */
fRet
/=
GNUM_const
(
0
.
99795
)
;
/* don't know what this constant means in original */
return
value_new_float
(
fRet
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment