# Numeric types and their relationships

**URL:** https://discourse.julialang.org/t/numeric-types-and-their-relationships/7869
**Category:** General Usage
**Tags:** question, inheritance
**Created:** [December 20, 2017, 4:41am UTC](https://discourse.julialang.org/t/numeric-types-and-their-relationships/7869 "2017-12-20T04:41:54Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [December 20, 2017, 6:50am UTC](https://discourse.julialang.org/t/numeric-types-and-their-relationships/7869/5 "2017-12-20T06:50:26Z")

</div>

There are a few ways to look at it. One is that implementations of rationals are not a subset of implementations of integers. Another is to ask this question: how would you define rationals without already having defined the integers?

Another view is a bit more philosophical, but fundamentally similar… Although the integers are isomorphic to a subset of the rationals (those with unit denominator), and are conventionally identified with this subset, they are not _the same_ as this subset. If they were, you’d have a circular definition of the integers since you have to define the rationals in terms of the integers. This is similar to the situation in a computer implementation: you define rationals in terms of integers, so the integers cannot be a subtype of rationals.

---

_[View the full topic](https://discourse.julialang.org/t/numeric-types-and-their-relationships/7869)._
