Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Santiago
sakia
Commits
3d9c6699
Commit
3d9c6699
authored
10 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
Calculate and display UD(t+1) in informations_tab computed formula
round values from referential in informations_tab
parent
80608cca
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cutecoin/gui/informations_tab.py
+11
-9
11 additions, 9 deletions
src/cutecoin/gui/informations_tab.py
with
11 additions
and
9 deletions
src/cutecoin/gui/informations_tab.py
+
11
−
9
View file @
3d9c6699
...
...
@@ -6,6 +6,7 @@ Created on 31 janv. 2015
import
logging
import
datetime
import
math
from
PyQt5.QtWidgets
import
QWidget
from
..gen_resources.informations_tab_uic
import
Ui_InformationsTabWidget
...
...
@@ -50,23 +51,23 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget):
self
.
label_general
.
setText
(
"""
<table cellpadding=
"
5
"
>
<tr><td align=
"
right
"
><b>{:
.2f
}</b></div></td><td>{:} {:}</td></tr>
<tr><td align=
"
right
"
><b>{:
.2f
}</b></td><td>{:} {:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></div></td><td>{:} {:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:} {:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:
.2f
}</b></td><td>{:} {:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:} {:}</td></tr>
<tr><td align=
"
right
"
><b>{:2.2%} / {:} days</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
</table>
"""
.
format
(
self
.
get_referential_diff_value
(
block
[
'
dividend
'
]),
round
(
self
.
get_referential_diff_value
(
block
[
'
dividend
'
])
)
,
'
Universal Dividend UD(t) in
'
,
self
.
get_referential_name
(),
self
.
get_referential_value
(
block
[
'
monetaryMass
'
]),
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
])
)
,
'
Monetary Mass M(t) in
'
,
self
.
get_referential_name
(),
block
[
'
membersCount
'
],
'
Members N(t)
'
,
self
.
get_referential_value
(
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]),
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
])
)
,
'
Monetary Mass per member M(t)/N(t) in
'
,
self
.
get_referential_name
(),
block
[
'
dividend
'
]
/
(
block_t_minus_1
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
]),
...
...
@@ -125,11 +126,12 @@ class InformationsTabWidget(QWidget, Ui_InformationsTabWidget):
'
Fundamental growth (c) / Delta time (dt)
'
,
'
UD(t+1) = MAX { UD(t) ; c * M(t) / N(t) }
'
,
'
Universal Dividend (formula)
'
,
'
UD(t+1) = MAX {{ {:.2f} {:} ; {:2.0%} * {:.2f} {:} / {:} }}
'
.
format
(
self
.
get_referential_diff_value
(
block
[
'
dividend
'
]),
'
{:} = MAX {{ {:} {:} ; {:2.0%} * {:} {:} / {:} }}
'
.
format
(
math
.
ceil
(
max
(
block
[
'
dividend
'
],
params
[
'
c
'
]
*
block
[
'
monetaryMass
'
]
/
block
[
'
membersCount
'
])),
round
(
self
.
get_referential_diff_value
(
block
[
'
dividend
'
])),
self
.
get_referential_name
(),
params
[
'
c
'
],
self
.
get_referential_value
(
block
[
'
monetaryMass
'
]),
round
(
self
.
get_referential_value
(
block
[
'
monetaryMass
'
])
)
,
self
.
get_referential_name
(),
block
[
'
membersCount
'
]
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment