# How find numbers in this list of inequalities?

Consider for example list = {1 < x < 1.8, x > 1.8, x == 1. || x == 1.8}.

I want to get the (floating) numbers in this list, i.e. 1. and 1.8. They can be accessed with Take, for example list[[1, 3]] returns 1.8. So I could iterate over each element of the list, find it's dimensions and select each part and keep only floating numbers. But I suppose there is a simpler way.

The question is, is there a simple function to return {1.,1.8} from list?

• Cases[list, _Real, Infinity] // DeleteDuplicates – JungHwan Min Sep 5 '16 at 20:16

Cases would work here.

Cases[list, _Real, Infinity] // DeleteDuplicates


{1.8, 1.}