Java's BigDecimal.power(BigDecimal exponent): Is there a Java library that does it? -
java's bigdecimal.pow(int)
method accepts integer parameter, no bigdecimal
parameter.
is there library, apache's commons-lang, supports bigdecimal.pow(bigdecimal)
? should able calculate "1.21".pow("0.5")
return "1.1"
.
there math.bigdecimal implementation of core mathematical functions source code available cornell university library here (also can download library tar.gz). here sample of library use:
import org.nevec.rjm.*; import java.math.bigdecimal; public class test { public static void main(string... args) { bigdecimal = new bigdecimal("1.21"); bigdecimal b = new bigdecimal("0.5"); system.out.println(bigdecimalmath.pow(a, b).tostring()); } }
prints out:
1.1
update
there no license info neither in info page nor in source code files. abstract of public paper describes work of library contains phrase "the full source code made available.",
but, portal arxiv.org (where paper , source files hosted) has following licensing aggrement:
arxiv license information
arxiv repository scholarly material, , perpetual access necessary maintain scholarly record. such, arxiv keeps permanent record of every submission , replacement announced.
arxiv not ask copyright transferred. however, require sufficient rights allow distribute submitted articles in perpetuity. in order submit article arxiv, submitter must either:
- grant arxiv.org non-exclusive , irrevocable license distribute article, , certify have right grant license,
- certify work available under either creative commons attribution license, or creative commons attribution-noncommercial-sharealike license, , have right grant license, or
- certify work in public domain (we store information associating create commons public domain declaration submission)
so, basically, work (as paper , accompanying source code legally called) submited , accepted in arxiv doesn't states use of creative commons attribution-noncommercial-sharealike license published in public domain , creative commons attribution license used.
conclusion
due fact work (the paper , source code) doesn't claim (in fact not declares licensing) use of creative commons attribution-noncommercial-sharealike license then, based on arxiv license information page rules, it's under creative commons attribution license allows share, copy, distribute , transmit, remix (adapt) , make commercial use of work
also, if still have legal doubts licensing can contact author of work, richard j. mathar directly in arxiv.org portal (you have register in portal in order though)
Comments
Post a Comment