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
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
88e72355
Commit
88e72355
authored
Jan 30, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed accurance of log function + real value output on Linux w/Russian
locale
parent
3e319d5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/shared/stdlib/kumirstdlib.hpp
src/shared/stdlib/kumirstdlib.hpp
+8
-1
No files found.
src/shared/stdlib/kumirstdlib.hpp
View file @
88e72355
...
...
@@ -416,7 +416,10 @@ public:
}
inline
static
real
lg
(
real
x
)
{
if
(
x
>
0.0
)
{
return
::
log
(
x
)
/::
log
(
10.0
);
real
num
=
::
log
(
x
);
real
den
=
::
log
((
real
)
10.0
);
real
result
=
num
/
den
;
return
result
;
}
else
{
Core
::
abort
(
Core
::
fromUtf8
(
"Логарифм от не положительного числа"
));
...
...
@@ -904,6 +907,10 @@ public:
if
(
rightSpaces
>
0
)
result
.
append
(
rightSpaces
,
' '
);
}
for
(
size_t
i
=
0
;
i
<
result
.
length
();
i
++
)
{
if
(
result
[
i
]
==
','
)
result
[
i
]
=
'.'
;
}
if
(
!
expform
)
{
int
chopPos
;
bool
dotFound
=
false
;
...
...
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