mersenneforum.org  

Go Back   mersenneforum.org > Other Stuff > Forum Feedback

Reply
 
Thread Tools
Old 2016-03-10, 20:06   #23
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

202016 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
And maybe add commas to parts that are more than three digits.
Via the magic of number_format() we have this fixed!

Code:
2*2*2*2*5*5*5*5
73*137
2*3*1,667
7*1,429
2*2*41*61
3*5*23*29
2*5,003
10,007
2*2*2*3*3*139
10,009
2*5*7*11*13
3*47*71
2*2*2,503
17*19*31
2*3*1,669
5*2,003
2*2*2*2*2*313
3*3*3*7*53
2*5,009
43*233
2*2*3*5*167
11*911
2*5,011
3*13*257
2*2*2*7*179
5*5*401
2*3*3*557
37*271
2*2*23*109
3*3,343
2*5*17*59
Also, the forced setting of "1" for private messages has now been changed to a random number because it looks neater and because it is more confusing, which is always fun!

Xyzzy is offline   Reply With Quote
Old 2016-03-10, 20:11   #24
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

100000001000002 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
We would also like to substitute "×" for "*".
Fixed!



Edit1: Adding spaces takes up too much room. The display will continue to another line but it looks weird.
Edit2: Special thanks to this web page for the ability to prototype rapidly and this web site to make our code less ugly.
Xyzzy is offline   Reply With Quote
Old 2016-03-10, 23:55   #25
snme2pm1
 
"Graham uses ISO 8601"
Mar 2014
AU, Sydney

35 Posts
Default Universal date format

Quote:
Originally Posted by Xyzzy View Post
We have some free time to work on the forum, so are there any requests?
Is it feasible to utilise ISO 8601 universal style dates, e.g. 2016-03-11?
The petition to do that at mersenne.org was successful, with Madpoo's efforts appreciated.
I suppose that would depend on such being provisioned by an appropriate version of vBulletin.
snme2pm1 is offline   Reply With Quote
Old 2016-03-11, 00:32   #26
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

25·257 Posts
Default

Quote:
Originally Posted by snme2pm1 View Post
Is it feasible to utilise ISO 8601 universal style dates, e.g. 2016-03-11?
It would be an option.

http://php.net/manual/en/function.date.php

Date formats are a very volatile subject here, for some reason. You would need to get a lot of members to agree with the change. Any time we mess with the format even the littlest bit everyone goes bananas. (Maybe make a poll?)

Xyzzy is offline   Reply With Quote
Old 2016-03-11, 02:59   #27
axn
 
axn's Avatar
 
Jun 2003

31·163 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
It would be an option.

http://php.net/manual/en/function.date.php

Date formats are a very volatile subject here, for some reason. You would need to get a lot of members to agree with the change. Any time we mess with the format even the littlest bit everyone goes bananas. (Maybe make a poll?)
Actually I think this is one of the easier ones. yyyy-mm-dd date format is the only logical math-y forum-approved date-format. A poll should show the clear consensus on this one
axn is offline   Reply With Quote
Old 2016-03-11, 03:08   #28
axn
 
axn's Avatar
 
Jun 2003

31·163 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Someday, we would like to format the post count like this:

2 * 33 * 1234

That will require a new approach to our code.
Instead of immediately concatenating a factor, increment a counter. Then concatenate a power if the count is > 1. Sure, it will be some more lines of code, but not a whole lot complex.

Also, if you haven't implemented the i*i<=x condition in while loop, I strongly advice to do so. For larger numbers this could lead to substantial savings.
axn is offline   Reply With Quote
Old 2016-03-11, 05:08   #29
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

22×733 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Someday, we would like to format the post count like this:

2 * 33 * 1234

That will require a new approach to our code.

We would also like to substitute "×" for "*". And maybe add commas to parts that are more than three digits.

So:

2 × 33 × 1,234

For now we are happy with the results.

If $t is the expanded factor string...

implode('×',array_map(function($v,$k){return $v>1?"$k[ sup]$v[/sup]":$k;},$a=array_count_values(explode('×',$t)),array_keys($a)));

... minus the space before sup.
Mark Rose is offline   Reply With Quote
Old 2016-03-11, 05:36   #30
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

822410 Posts
Default

This one is real ugly, but it works:



Xyzzy is offline   Reply With Quote
Old 2016-03-11, 05:42   #31
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

100000001000002 Posts
Default

Quote:
Originally Posted by Mark Rose View Post
implode('×',array_map(function($v,$k){return $v>1?"$k[ sup]$v[/sup]":$k;},$a=array_count_values(explode('×',$t)),array_keys($a)));


Xyzzy is offline   Reply With Quote
Old 2016-03-11, 06:05   #32
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

100101100011002 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Someday, we would like to format the post count like this:

2 * 33 * 1234

That will require a new approach to our code.
Sure, it will have to guess which part to factorize in primes, and which part to let unfactored to look nice (i.e. do not factor 1234 into 2*617, because it looks more nicer when written 1234, you know, consecutive numbers... blah blah...)
LaurV is offline   Reply With Quote
Old 2016-03-11, 06:08   #33
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

22×733 Posts
Default

Quote:
Originally Posted by Xyzzy View Post


I went golfing:



And now I must go to bed.

Last fiddled with by Mark Rose on 2016-03-11 at 06:17
Mark Rose is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collaboration Requests robert44444uk Prime Gap Searches 2 2017-01-17 07:57
Requests for change... WraithX FactorDB 32 2014-12-18 03:40
Manual Requests tului GPU Computing 15 2014-06-24 06:22
a few simple requests for v5 ixfd64 PrimeNet 44 2010-01-11 20:21
New Year requests masser Sierpinski/Riesel Base 5 22 2007-09-24 21:05

All times are UTC. The time now is 13:35.


Sat Jul 17 13:35:41 UTC 2021 up 50 days, 11:22, 1 user, load averages: 1.47, 1.57, 1.58

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.