01:25
swills has quit [Remote host closed the connection]
01:30
swills has joined #jruby
01:30
swills has joined #jruby
03:27
<
GitHub178 >
jruby/ruby-2.4 637ca8a Charles Oliver Nutter: Fix scaling and clean up Rational#round.
03:27
<
GitHub178 >
jruby/ruby-2.4 4b13469 Charles Oliver Nutter: Kill some deprecated and incorrect uses of op_idiv.
04:13
_whitelogger_ has joined #jruby
04:19
<
GitHub135 >
jruby-openssl/secure-random-opts df0b4e3 kares: we (still) should not break older JRubies we test against on CI (in 0.9.x)
05:16
ericu-sp1cworks has quit [Ping timeout: 240 seconds]
05:22
ericu-spicworks has joined #jruby
05:52
<
GitHub69 >
jruby/ruby-2.4 d331d07 Charles Oliver Nutter: Fix Float#rationalize for Integer unification.
05:52
<
GitHub69 >
jruby/ruby-2.4 a133cb3 Charles Oliver Nutter: Emulate rounding up without damaging precision.
05:52
<
GitHub69 >
jruby/ruby-2.4 c8f8c10 Charles Oliver Nutter: Make sure double to Bignum goes through normalization.
06:12
prasunanand has joined #jruby
06:42
<
GitHub42 >
jruby/ruby-2.4 5f4caec Charles Oliver Nutter: Ensure Kernel#integer goes through the same Inf/NaN checks.
06:56
<
GitHub181 >
jruby-openssl/secure-random-opts 9c2a464 kares: try tuning JRuby's SecureRandom preferred instance logic a bit...
07:56
vtunka has joined #jruby
08:25
vtunka has quit [Quit: Leaving]
08:32
kitallis has quit [Ping timeout: 240 seconds]
08:32
brixen has quit [Ping timeout: 240 seconds]
08:33
vtunka has joined #jruby
08:41
kitallis has joined #jruby
08:45
brixen has joined #jruby
08:54
drbobbeaty has joined #jruby
09:17
Cooter has joined #jruby
09:18
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
10:11
prasunanand has quit [Quit: Leaving]
10:11
prasun has joined #jruby
11:19
drbobbeaty has joined #jruby
11:53
bbrowning_away is now known as bbrowning
12:19
vtunka has quit [Quit: Leaving]
12:21
vtunka has joined #jruby
12:49
vtunka has quit [Quit: Leaving]
13:03
vtunka has joined #jruby
13:35
lanceball has quit [Excess Flood]
13:36
lanceball has joined #jruby
14:38
vtunka has quit [Quit: Leaving]
16:06
chrisarcand has quit [Ping timeout: 260 seconds]
16:07
chrisarcand has joined #jruby
17:10
jeremyevans has quit [Ping timeout: 260 seconds]
18:19
subbu is now known as subbu|lunch
18:37
<
headius >
kares: I'm so tired of entropy issues :-(
18:38
<
headius >
just when I think we've got it someone in our toolchain changes again
18:54
<
headius >
kares: you too if you have time
18:55
<
headius >
it feels icky but I'm not sure of a better fix
18:55
<
headius >
probably some way to chew on the raw float bits and figure this out without Big*
18:56
<
headius >
MRI does not have this problem because their fixnum boundary is short of 64 bits
18:56
<
headius >
so they can exceed fixnum precision in a long and then decide what to do
18:59
subbu|lunch is now known as subbu
19:05
jeremyevans has joined #jruby
19:07
<
enebo >
I don't really grok two == checks here
19:07
<
enebo >
I mean a java double mapped into a long can be a larger value than MIN or MAX by a bit over MRI so I feel I am missing something
19:09
subbu is now known as subbu|away
19:33
nirvdrum has quit [Ping timeout: 260 seconds]
20:21
<
headius >
enebo: it's an attempt to detect that the truncation of the double produced a value outside of long
20:22
<
headius >
the case I ran into is in some specs, specifically this: 9223372036854775808.1.floor
20:22
<
headius >
that should produce a Bignum of 9223372036854775808 but double to long casting truncates to ...807
20:22
<
headius >
which is fixnum max
20:25
subbu|away is now known as subbu
20:30
<
enebo >
headius: but can it be > than that value? or is the double coming in limited to Fixnum.Max in some way?
20:31
<
enebo >
or maybe that changes sign to negative
20:33
<
lopex >
enebo: I guess it's a question what is the resolution of mantissas at those scales
20:34
<
enebo >
lopex: ok so just glancing at that check I don't know if that is all we need to check or not. Actually just glancing at it I don't really know why the check is there at all
20:35
<
enebo >
I mean I can guess
20:35
<
lopex >
headius: does strictfp change anything here ?
20:35
<
lopex >
is strictfp stil la thing ?
20:37
<
lopex >
enebo: oh you mean why would they equal ?
20:37
<
lopex >
or what it would save ?
20:46
<
headius >
lopex: I could try it but I've never seen strictfp do anything at all
20:46
<
headius >
enebo: I check == because it can't be bigger (it's a long) and the troublesome case was at the boundary
20:47
<
headius >
so if it resolves to long max I assume it could be bigger than fixnum and use the alternative logic that doesn't use double > long
20:47
<
enebo >
headius: I think I am only confused because Long.MAX and Fixnum.MAX are not the same value
20:47
<
headius >
it's the double > long that resolves weird because that double truncates to long max
20:47
<
lopex >
says nearest
20:47
<
headius >
enebo: you sure?
20:48
<
lopex >
oh arent they ?
20:48
<
headius >
I'm pretty sure they're the same even though we calculate Fixnum.MAX
20:48
<
enebo >
public static final long MAX = (1L<<(BIT_SIZE - 1)) - 1;
20:48
<
headius >
which would be 64-bit long max
20:48
<
enebo >
if so then why do we not just do Long.MAX then?
20:48
<
headius >
because we used to calculate it as bit size - 2 or whatever
20:48
<
headius >
now I guess there's no reason
20:49
<
headius >
we changed to make fixnum just be long many years ago
20:49
<
enebo >
I am too old to remember what two's complement is anymore so I cannot just tell by looking at that
20:49
<
enebo >
so my question only got muddled because I did not realize that was Long.MAX
20:50
<
headius >
for MRI this value is already well beyond fixnum so they don't have it
20:50
<
enebo >
but we may want to change this logic in RubyFixnum since we are not likely to subtract a bit any more
20:50
<
headius >
it's odd that there are tests for this boundary in specs because it isn't MRI's boundary, it's 64-bit long boundary
20:50
<
headius >
sure, I'll change it
20:50
<
lopex >
yeah MRI has one bit less
20:50
<
enebo >
yeah they are 62 bit right?
20:50
<
enebo >
1 for tag and one for sign
20:51
<
enebo >
oh well 63 including sign bit
20:51
<
headius >
$ jruby -e "p java.lang.Long::MAX_VALUE, org.jruby.RubyFixnum::MAX"
20:51
<
headius >
9223372036854775807
20:51
<
headius >
9223372036854775807
20:51
<
headius >
just confirming
20:51
<
headius >
lopex: yes
20:51
<
lopex >
enebo: but in second completion bit is a value
20:51
<
lopex >
sign bit is a value bit
20:51
<
headius >
they definitely still use tagged pointers for fixnums and added flonums a couple releases ago
20:51
<
enebo >
in any case they lost a bit
20:52
<
enebo >
so why do they test beyond that boundary
20:52
<
headius >
so the problem I had was that case above turning into long max because it is right near the boundary
20:52
<
enebo >
maybe for us
20:52
<
lopex >
the tagging goes deeper for symbols etc
20:52
<
lopex >
but for fixnum it's only one bit
20:52
<
headius >
my logic basically just backs off and does a more accurate BigDecimal/BigInteger conversion when the result was at the boundary
20:53
<
headius >
all other double > MAX cases should result in bignum
20:53
prasun has quit [Remote host closed the connection]
20:55
<
lopex >
if it matches mri rounding then sure
20:55
<
lopex >
I see that float_invariant_round being an opt I assume ?
20:59
<
headius >
lopex: yeah I believe so
21:01
<
lopex >
headius: wrt your latest jcodings changes, "fixed width encoding" name no longer holds
21:01
<
headius >
I guess that class could be AbstractUTF32Encoding or something
21:02
<
lopex >
oh, is 1.7 eol now ?
21:02
<
lopex >
headius: I wanted to remove some jcodings classes
21:02
<
headius >
pretty much yeah
21:02
<
lopex >
those BaseWhatever
21:02
<
headius >
what classes?
21:03
<
lopex >
those which delt with the bifurcation
21:03
<
headius >
right, we're never going back
21:03
<
lopex >
in 1.8 these werent validating the inputs
21:04
<
lopex >
headius: but I still think having mri modes in same code base was a good idea
21:04
<
lopex >
imagine the cross merging madness
21:07
<
lopex >
I just recall the day that decision was made
21:08
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
21:09
<
headius >
I just realized Math.round returns a long, but round(2) returns a double
21:10
<
headius >
that explains some of my issues
21:12
hays has quit [Quit: No Ping reply in 180 seconds.]
21:13
hays has joined #jruby
21:13
Specialist has joined #jruby
21:14
<
headius >
enebo: I'm not sure what to do here
21:14
<
headius >
our Float.round can't handle doubles > long max at all because of this
21:15
<
headius >
might have been the actual bug
21:15
<
headius >
I'll have to duplicate what libc round does
21:16
<
enebo >
hmm seems weird
21:16
<
enebo >
but sure enough
21:16
<
lopex >
maybe libc does something simple
21:17
<
headius >
Math.floor and ceil return double but round doesn't :-\
21:18
<
enebo >
so I am confused can a java double return a value > than a long if round happens to return long?
21:18
<
enebo >
or is this for like half rounds or somethign as the issue
21:18
<
enebo >
heh ignore that
21:18
<
headius >
Math.rint returns double
21:19
<
headius >
how messed up is that naming
21:19
<
enebo >
looks sensible since they took the POSIX name already :)
21:20
<
headius >
these look like they were both in 1.0
21:20
<
headius >
posix has round and roundi
21:23
<
headius >
ok, so using rint still passes round specs but I can't remove my Big* logic
21:26
<
headius >
passes specs but fails MRI suite
21:26
<
headius >
once again specs are gappy
21:29
<
headius >
ugh, rint is round half to even
21:33
bbrowning is now known as bbrowning_away
21:40
<
lopex >
like it should be viewed at 3x
21:42
<
lopex >
wow, but it shows deopt frames quite in depth
22:03
knu has quit [Ping timeout: 240 seconds]
22:05
knu has joined #jruby
23:43
deep-book-gk_ has joined #jruby
23:45
deep-book-gk_ has left #jruby [#jruby]