# \#numeric

**URL:** https://forums.swift.org/tag/numeric/286.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Convert Double-String to Int64 after multiplying by 100 gives wrong value](https://forums.swift.org/t/convert-double-string-to-int64-after-multiplying-by-100-gives-wrong-value/74162)

<div class="topic-metadata">

**Author:** [@himanshu](https://forums.swift.org/u/himanshu)\
**Replies:** 12\
**Last updated:** [September 2, 2024, 10:51am UTC](https://forums.swift.org/t/convert-double-string-to-int64-after-multiplying-by-100-gives-wrong-value/74162 "2024-09-02T10:51:09Z")

</div>

Hi, I want to convert a double-string (like "0.29") to Int64 after multiplying by 100 using the following function. func convertAmount(amountString: String?) -\> Int64 { guard let amountText = amountString else…

---

## [Is this a compiler bug?](https://forums.swift.org/t/is-this-a-compiler-bug/57157)

<div class="topic-metadata">

**Author:** [@jeremyabannister](https://forums.swift.org/u/jeremyabannister)\
**Replies:** 3\
**Last updated:** [May 5, 2022, 1:13pm UTC](https://forums.swift.org/t/is-this-a-compiler-bug/57157 "2022-05-05T13:13:12Z")

</div>

I expected this code to compile: extension Sequence where Element: Numeric { func product () -\> Element { self.reduce(into: .init(integerLiteral: 1)) { $0 \*= $1 } } } But I'm hit with this error: …

---

## [Numeric.zero trouble](https://forums.swift.org/t/numeric-zero-trouble/29621)

<div class="topic-metadata">

**Author:** [@AlexSedykh](https://forums.swift.org/u/AlexSedykh)\
**Replies:** 3\
**Last updated:** [October 8, 2019, 12:37pm UTC](https://forums.swift.org/t/numeric-zero-trouble/29621 "2019-10-08T12:37:56Z")

</div>

Hello. I have trouble with Numeric.zero property. I try to check distance between a center minus radius of a body and the beginning of the outer box i.e zero point of coordinates. And I have the error. Can you please ex…
