Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix factor.dots #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix factor.dots #91

wants to merge 2 commits into from

Conversation

ZippyMagician
Copy link

I don't know if I was thinking it would work differently, but the old factor function didn't work properly. For example, if I put in 24 it would output 1, 2, 3, and 24 before terminating. My version works the way I thought it would, outputting 1, 2, 3, 4, 6, 12, and 24.

@ZippyMagician
Copy link
Author

ZippyMagician commented May 21, 2020

After testing the original on tio.run I get the outputs
1
24.0
2
12.0
3
8.0
4
6.0?
Is this an issue with the online interpreter on your website?

@aaronjanse
Copy link
Owner

Apart from the formatting of numbers as floats vs ints, for me, the original has the same output when run locally, on tio.run, and on ajanse.me.

%!for_in_range.dots f

/.
# /{/}$#
?/* \#$~\
*~*{%}-//
|\1#*-*//1#-.
| .-#1f-+-\
*--{^}+{+}/
*-#2\-\#0*~~&
\#1{/}/  \*/
1
24
2
12
3
8
4
6

Regardless, I'd love to use your implementation! However, I can't seem to get the implementation you added in the PR to run correctly. Maybe the spacing is incorrect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants