Julia 1.11.4
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x, y::Float64) y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia 1.11.5 Documentation
-fexcess-precision=16 flag does for C/C++ code. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x, y::Float64) y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia 1.11.6 Release Notes
-fexcess-precision=16 flag does for C/C++ code. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x, y::Float64) y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia v1.4.2 Documentation
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x::Float64 y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 1314 页 | 4.29 MB | 1 年前3Julia v1.3.1 Documentation
so�ware and use Float32 for calcula�ons. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 (generic function with 2 methods) 21.3. PARAMETRIC METHODS 155 julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x, y::Float64) y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambigua�ng method be defined first, since otherwise0 码力 | 1276 页 | 4.36 MB | 1 年前3Julia v1.5.4 Documentation
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x::Float64 y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 1337 页 | 4.41 MB | 1 年前3Julia v1.6.6 Documentation
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x::Float64 y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 1324 页 | 4.54 MB | 1 年前3Julia 1.6.5 Documentation
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x::Float64 y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 1325 页 | 4.54 MB | 1 年前3Julia 1.6.7 Documentation
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x::Float64 y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 1324 页 | 4.54 MB | 1 年前3Julia 1.5.3 Documentation
software and use Float32 for calculations. julia> sizeof(Float16(4.)) 2 julia> 2*Float16(4.) Float16(8.0) The underscore _ can be used as digit separator: julia> 10_000, 0.000_000_005, 0xdead_beef, 0b1011_0010 y::Float64) = x + 2y g (generic function with 2 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates: g(x::Float64 y::Float64) = 2x + 2y g (generic function with 3 methods) julia> g(2.0, 3) 7.0 julia> g(2, 3.0) 8.0 julia> g(2.0, 3.0) 10.0 It is recommended that the disambiguating method be defined first, since0 码力 | 1335 页 | 4.41 MB | 1 年前3
共 87 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9