# Base for Affine Geometry models

**URL:** <https://discourse.julialang.org/t/base-for-affine-geometry-models/64614>\
**Category:** New to Julia\
**Created:** [July 14, 2021, 7:18am UTC](https://discourse.julialang.org/t/base-for-affine-geometry-models/64614 "2021-07-14T07:18:22Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Gilles\_Dubois](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gilles_dubois/32/25830_2.png) [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Post date:** [July 20, 2021, 5:58am UTC](https://discourse.julialang.org/t/base-for-affine-geometry-models/64614/21 "2021-07-20T05:58:02Z")

</div>

It’s a point of view, I understand it and I take it into account now. and BTWI wrote a special constructor doing the job :

```julia
RP(V::Vector{Int64})=Point{Float64}(Vector{Float64}(V))

```

But when Julia waits for a Vector{Float} (case of a constructor) since there is a natural trans-typing from Int64 to Float64. isn’t it natural to make some small effort to translate a Vector{Int64} given into a Vector{Float64} expected ?  
Can you cite cases where this preemptive attitude can lead to confusion ?

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [July 20, 2021, 7:08am UTC](https://discourse.julialang.org/t/base-for-affine-geometry-models/64614/22 "2021-07-20T07:08:46Z")

</div>

One example is that

```julia
julia> x-1+1 == x
true

```

works in some cases where

```julia
julia> Int64(Float64(x)-1)+1 == x

```

does not, such as `x = typemax(Int64)`.

```julia
julia> Int64(Float64(x)-1)+1 == x
ERROR: InexactError: Int64(9.223372036854776e18)

```

---

<div class="post-metadata">

**Author:** ![Gilles\_Dubois](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gilles_dubois/32/25830_2.png) [@Gilles\_Dubois](https://discourse.julialang.org/u/Gilles_Dubois)\
**Post date:** [July 20, 2021, 7:57am UTC](https://discourse.julialang.org/t/base-for-affine-geometry-models/64614/23 "2021-07-20T07:57:25Z")

</div>

Yes, but …  
In this case no information about type of x.  
x can be anything and the test can success or fail according type and value.  
The kind of example i’m waiting for is when the system is expecting a Float and receives an Int instead.  
This one doesn’t enter this category.

[Previous page](https://discourse.julialang.org/t/base-for-affine-geometry-models/64614.md?page=1)
