IT討論區(79) 就嚟行行NPL

1001 回覆
3 Like 3 Dislike
2020-04-09 14:41:33
考慮a+b sqrt(d) where a and b are integers
呢個set equip埋正正常常既一堆運算 會form一個叫Q(sqrt(d))既ring 英文叫做quadratic integer (d mod 4=1個時有啲唔同 但係作為introductory 我地忽略細節唔講)
phi同pho既分子都係a+b sqrt(5)既form where a,b are integer
有個特性 係佢地既任何正整數次方都係a+b sqrt(d) form 對計binet既作用好trivial
其他ring既特性係呢個討論無用
2020-04-09 14:46:53
完全唔識樓上兩位大神講既野
係咪唔配做IT9
2020-04-09 14:48:49
A ring is a set R equipped with two binary operations + and · satisfying the following three sets of axioms, called the ring axioms

R is an abelian group under addition, meaning that:
(a + b) + c = a + (b + c) for all a, b, c in R (that is, + is associative).
a + b = b + a for all a, b in R (that is, + is commutative).
There is an element 0 in R such that a + 0 = a for all a in R (that is, 0 is the additive identity).
For each a in R there exists −a in R such that a + (−a) = 0 (that is, −a is the additive inverse of a).
R is a monoid under multiplication, meaning that:
(a · b) · c = a · (b · c) for all a, b, c in R (that is, · is associative).
There is an element 1 in R such that a · 1 = a and 1 · a = a for all a in R (that is, 1 is the multiplicative identity).
Multiplication is distributive with respect to addition, meaning that:
a ⋅ (b + c) = (a · b) + (a · c) for all a, b, c in R (left distributivity).
(b + c) · a = (b · a) + (c · a) for all a, b, c in R (right distributivity).

留意返quadratic integer係咪ring其實係呢個討論唔重要 只不過quadratic integer真係一個ring 而且大家習慣叫做quadratic integer ring
2020-04-09 14:55:31
IT 啲款嘛嘛地
2020-04-09 15:00:40
咁i.t呢
2020-04-09 15:05:55
Sorry, I though your DP=dynamic programming but apparently DP = decimal places. Now it makes sense to me.

Yes, you can use arbitrary-sized decimal number and bound the error.

1) I think epsilon should be bounded by

n * phi^(n-1) * epsilon < sqrt(5)

but your bound of 1 also works as it is smaller.

2) your bound assumes that we can compute phi accurately so that there is only rounding error in the last decimal place due to lack of precision. Usually sqrt() is computer by a Taylor series or by Newton's method. It is a good question to ask how we can be sure that phi is accurate enough.
2020-04-09 15:05:57
手巴價係幾多
2020-04-09 15:09:46
Just compute sqrt(5) to a controlled precision, than you get phi and pho with a controlled precision
Sqrt(5) precision estimation:
1) use standard numerical method with known error bound, or
2) square the value and observe difference to 5
2020-04-09 15:10:06
O(1 HBU)
2020-04-09 15:18:53
How bout you
2020-04-09 15:23:20
有冇聽過咩係蔗渣既價錢 燒鵝既味道
2020-04-09 15:32:13
opposite 就見過大把
2020-04-09 15:34:13
我就係opposit
2020-04-09 16:03:24

你係opposite 咁我呢D垃圾係咩
2020-04-09 16:31:46
2020-04-09 16:36:26
我係 Oppa sit
2020-04-09 16:40:47
好似好屈機
2020-04-09 17:00:56
少尾機
2020-04-09 17:26:18
想搭單問下vue同JQuery 可唔可以同時使用的
原因係舊底野用緊JQuery 而家可能想慢慢轉
2020-04-09 18:09:34
agent 真係死唔斷氣
2020-04-09 18:25:06
咁叫個agent等食屎
吹水台自選台熱 門最 新手機台時事台政事台World體育台娛樂台動漫台Apps台遊戲台影視台講故台健康台感情台家庭台潮流台美容台上班台財經台房屋台飲食台旅遊台學術台校園台汽車台音樂台創意台硬件台電器台攝影台玩具台寵物台軟件台活動台電訊台直播台站務台黑 洞