3 Star 3 Fork 0

Gitee 极速下载/Arb

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/fredrik-johansson/arb
Clone or Download
sgn.c 687 Bytes
Copy Edit Raw Blame History
/*
Copyright (C) 2016 Fredrik Johansson
This file is part of Arb.
Arb is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. See <http://www.gnu.org/licenses/>.
*/
#include "arb.h"
void
arb_sgn(arb_t res, const arb_t x)
{
if (arb_is_zero(x))
{
arb_zero(res);
}
else if (arb_contains_zero(x))
{
arf_zero(arb_midref(res));
mag_one(arb_radref(res));
}
else
{
arb_set_si(res, arf_sgn(arb_midref(x)));
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/Arb.git
git@gitee.com:mirrors/Arb.git
mirrors
Arb
Arb
master

Search