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
abc-interpreter
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
abc-interpreter
Commits
bebbd4b0
Verified
Commit
bebbd4b0
authored
Jun 27, 2019
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trailing zeroes in JavaScript implementation of RtoAC (after
df808685
)
parent
ece72875
Pipeline
#26115
passed with stages
in 13 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src-js/abc-interpreter.js
src-js/abc-interpreter.js
+3
-3
No files found.
src-js/abc-interpreter.js
View file @
bebbd4b0
...
...
@@ -567,7 +567,7 @@ class ABCInterpreter {
me
.
log
(
"
'
"
+
String
.
fromCharCode
(
v
)
+
"
'
"
);
},
print_real
:
function
(
v
)
{
me
.
log
(
Number
(
0
+
v
).
toPrecision
(
15
));
me
.
log
(
Number
(
0
+
v
).
toPrecision
(
15
)
.
replace
(
/
\.?
0*$/
,
''
)
);
},
powR
:
Math
.
pow
,
...
...
@@ -581,11 +581,11 @@ class ABCInterpreter {
lnR
:
Math
.
log
,
log10R
:
Math
.
log10
,
RtoAC_words_needed
:
function
(
v
)
{
v
=
Number
(
0
+
v
).
toPrecision
(
15
);
v
=
Number
(
0
+
v
).
toPrecision
(
15
)
.
replace
(
/
\.?
0*$/
,
''
)
;
return
2
+
((
v
.
length
+
7
)
>>
3
);
},
RtoAC
:
function
(
dest
,
v
)
{
v
=
Number
(
0
+
v
).
toPrecision
(
15
);
v
=
Number
(
0
+
v
).
toPrecision
(
15
)
.
replace
(
/
\.?
0*$/
,
''
)
;
me
.
memory_array
[
dest
/
4
]
=
6
*
8
+
2
;
// __STRING__
me
.
memory_array
[
dest
/
4
+
1
]
=
0
;
me
.
memory_array
[
dest
/
4
+
2
]
=
v
.
length
;
...
...
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