[#87847] undefined symbol: mjit_init_p — Leam Hall <leamhall@...>

I pulled Ruby trunk on 3 Jul and am now getting errors similar to the

10 messages 2018/07/07

[#88088] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — normalperson@...

Issue #14937 has been reported by normalperson (Eric Wong).

9 messages 2018/07/24

[ruby-core:88043] [Ruby trunk Bug#14926] Different results between Enumerable#sum and #reduce when Float::INFINITY present

From: ruby-core@...
Date: 2018-07-21 22:37:57 UTC
List: ruby-core #88043
Issue #14926 has been updated by marcandre (Marc-Andre Lafortune).


Yes, definitely a bug in the algorithm trying to minimize floating errors. Result must be `Float::INFINITY`.

shevegen (Robert A. Heiler) wrote:
> I am a bit surprised about infinity though:
> 
>     a = [Float::INFINITY].reduce(0, &:+)
>     b = [Float::INFINITY]
> 
>     puts (a == b) # => false

Using `p` instead of `puts` will show you you are comparing an array with float...

>     p a  # => Infinity
>     p b  # => [Infinity]

----------------------------------------
Bug #14926: Different results between Enumerable#sum and #reduce when Float::INFINITY present
https://bugs.ruby-lang.org/issues/14926#change-73060

* Author: swistak35 (Rafał Łasocha)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
When `Float::INFINITY` is present in array, `Enumerable#sum` and `Enumerable#reduce(0, &:+)` are giving different results.

```
puts [Float::INFINITY].sum
puts [Float::INFINITY].reduce(0, &:+)
```

results in

```
NaN
Infinity
```

And I would expect both of them to be `Infinity` (meaning: `#sum` is working incorrectly).

Checked on `ruby 2.5.1p57` and `ruby 2.4.3p205`, both have the same bug.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next