英文:
BigFloat in julia
问题
无法加载 bigFloat 包到 julia 中(奇怪的是,ArbFloat 包也不能)。当我执行:
```julia
using BigFloat
a = big"1.000000000000000000001"
b = big"1.000000000000000000002"
c = a + b
@show c
我得到以下错误:
ERROR: LoadError: ArgumentError: Package BigFloat not found in current path.
- Run `import Pkg; Pkg.add("BigFloat")` to install the BigFloat package.
Stacktrace:
[1] macro expansion
@ ./loading.jl:1163 [inlined]
[2] macro expansion
@ ./lock.jl:223 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
我重新安装了 julia,但问题没有解决。我也尝试在终端中按要求安装 BigFloat 包,但没有成功。我希望返回 c = 2.000000000000000000000000000000003
。
此外,我需要一个可以精确到 250 位小数的包。我试图使用 bigFloat,但无法安装它。AbsFloat 包也无法安装。
<details>
<summary>英文:</summary>
I can't load the bigFloat package into julia (oddly enough, neither can the ArbFloat package).
when I do:
using BigFloat
a = big"1.000000000000000000001"
b = big"1.000000000000000000002"
c = a + b
@show c
I get the following error:
ERROR: LoadError: ArgumentError: Package BigFloat not found in current path.
- Run
import Pkg; Pkg.add("BigFloat")
to install the BigFloat package.
Stacktrace:
[1] macro expansion
@ ./loading.jl:1163 [inlined]
[2] macro expansion
@ ./lock.jl:223 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
I reinstalled julia and it didn't solve the problem.
I also tried to install the BigFloat package as requested in the terminal, but without success.
wanted to return `c = 2.000000000000000000000000000000003.
Furthermore, I need a package that works with 250 decimal places of precision. I am trying to use bigFloat, but I couldn't install it. I couldn't install the AbsFloat package either.
</details>
# 答案1
**得分**: 3
`BigFloat` 不是一个包。如果你只是删除那一行,它将正常工作。
<details>
<summary>英文:</summary>
`BigFloat` isn't a package. if you just remove that line it will work.
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论