Floats and Rationals Sets

33 views
Skip to first unread message

Chris Smith

unread,
May 23, 2019, 1:30:22 PM5/23/19
to sympy
I was just thinking that we don't yet define a Rationals or Floats Set but they could be

Rationals = imageset((x, y), x/y, S.Integers*S.Naturals)
Floats = imageset((x, y), x/2**y, S.Integers, S.Integers)

Containment order would be

Reals contain Rationals contain Floats contain Integers contain Naturals0 contain Naturals

Would there be any advantages to having these defined?

/c

Aaron Meurer

unread,
May 23, 2019, 2:28:17 PM5/23/19
to sympy
We should have a Rationals, defined similarly to the Complexes.

For Floats, I am not so sure. The Floats set you defined would be
every float at every precision. Since floats are always restricted to
some finite precision, I'm not sure if this is useful.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/a836f420-077d-4321-9db6-15e4d922986a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages