Real encode
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
1 post
• Page 1 of 1
Real encode
Four decades of APL-ing and it finally occurs to me to wonder if encode takes a real left argument. Why? Listening to Prince sing "A Million Days". How long is that in years and days?
Of course the answer isn't really a fractional number of days. That's just probability blur from estimating instead of knowing exactly which years are leap years.
1e6⊤⍨0 365
2739 265
⍝ what about leap years?
1e6⊤⍨0,365+÷4
2737 310.75
⍝ and the centenaries that aren't leap years?
1e6⊤⍨0,365++/÷400 ¯100 4
2737 331.2775
Of course the answer isn't really a fractional number of days. That's just probability blur from estimating instead of knowing exactly which years are leap years.
- sjt
- Posts: 21
- Joined: Fri Nov 05, 2010 6:26 am
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group