Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
Evaluates the special functions of mathematical physics and statistics, including gamma, beta, error, Bessel, Airy, hypergeometric, elliptic and zeta functions, for real and complex arguments, using t
翻譯準備中
開發工具R · CGitHub @pedrobtz上線中營運者未確認
試用過了嗎? 點一下就好,不需要登入。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Evaluates the special functions of mathematical physics and statistics, including gamma, beta, error, Bessel, Airy, hypergeometric, elliptic and zeta functions, for real and complex arguments, using the same kernels as the SciPy librarys scipy.special module (<https://docs.scipy.org/doc/scipy/reference/special.html>). Functions keep SciPy names and argument order so that code translates directly between Python and R, and results agree with SciPy to within its own test tolerances. SciPy' is descr
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗R's special functions are scattered. Base R has the gamma function and
Bessel functions of real argument; complex Bessel functions,
hypergeometric functions, elliptic integrals and the Lambert W function
each live in their own package, or in gsl, which needs the GNU
Scientific Library installed. And when a model is written in Python and
checked in R, or the other way round, two libraries that disagree in the
last digits are a needless source of doubt.
zuspecial gives R the special functions of
scipy.special,
computed by the same C++ kernels: xsf,
the library SciPy's special functions are built from, at the commit
SciPy 1.18.1 uses.
sc_jv(v, z) is
scipy.special.jv(v, z), so code translates line by line.NA-aware, keeping
names and dimensions; floating-point conditions follow SciPy's
seterr(), as warnings or errors when asked for.LinkingTo: zuspecial.Nothing is needed at run time; Boost.Math headers, from the BH package, are needed to build it.
Install zuspecial from CRAN with:
install.packages("zuspecial")
or the development version from GitHub with:
# install.packages("pak")
pak::pak("pedrobtz/zuspecial")
library(zuspecial)
Functions are vectorised, and take complex arguments where SciPy does:
sc_gamma(c(0.5, 5))
#> [1] 1.772454 24.000000
sc_gamma(1 + 1i)
#> [1] 0.4980157-0.1549498i
Arguments come in SciPy's order, the order first for the Bessel
functions, where base R's besselJ() puts it second:
sc_jv(2.5, 3)
#> [1] 0.41271
besselJ(3, 2.5)
#> [1] 0.41271
As in SciPy, the type of the argument picks the result: the Bessel
function of order 0.5 at -1 is NaN for a real -1, and a complex
number for -1+0i:
sc_jv(0.5, -1)
#> [1] NaN
sc_jv(0.5, -1 + 0i)
#> [1] 5.551115e-17+0.6713967i
Poles, overflow and loss of precision are silent by default, as in SciPy, and can be turned into warnings or errors:
sc_gamma(-1)
#> [1] NaN
sc_errstate(sc_gamma(-1), singular = "warn")
#> Warning in sc_gamma(-1): sc_gamma: singular in 1 element, first at index 1.
#> [1] NaN
Functions that return several values in SciPy return a named list:
str(sc_airy(1))
#> List of 4
#> $ ai : num 0.135
#> $ aip: num -0.159
#> $ bi : num 1.21
#> $ bip: num 0.932
Every function is sc_ followed by its name in scipy.special, the
alias SciPy's own documentation uses (import scipy.special as sc).
zuspecial_info() for the versions and the table of functions.The kernels are SciPy's xsf, with its
bundled Cephes, AMOS, specfun, Faddeeva and qd code, and Boost.Math for
the functions SciPy evaluates with it. The reference values come from
xsref. zuspecial is also checked
against the gsl, Bessel, hypergeo, lamW, expint and Rmpfr
packages.