IT討論區(79) 就嚟行行NPL
手一黏便緊(UTC+9 2020-4-9 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-4-9 14:46:53 完全唔識樓上兩位大神講既野
係咪唔配做IT9
:^(
手一黏便緊(UTC+9 2020-4-9 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
prokofiev 2020-4-9 14:55:31 IT 啲款嘛嘛地
手一黏便緊(UTC+9 2020-4-9 15:00:40 咁i.t呢
:^(
Code4Food 2020-4-9 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-4-9 15:05:57 手巴價係幾多
手一黏便緊(UTC+9 2020-4-9 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

Ads

手一黏便緊(UTC+9 2020-4-9 15:10:06 O(1 HBU)
實驗羊 2020-4-9 15:18:53 How bout you
手一黏便緊(UTC+9 2020-4-9 15:23:20 有冇聽過咩係蔗渣既價錢 燒鵝既味道
一隻毒LIT狗 2020-4-9 15:32:13 opposite 就見過大把
:^(
:^(
:^(
手一黏便緊(UTC+9 2020-4-9 15:34:13 我就係opposit
:^(
一隻毒LIT狗 2020-4-9 16:03:24
:^(
:^(
:^(
:^(

你係opposite 咁我呢D垃圾係咩
喂你傻的嗎 2020-4-9 16:31:46
:^(
實驗羊 2020-4-9 16:36:26 我係 Oppa sit
手一黏便緊(UTC+9 2020-4-9 16:40:47 好似好屈機
:^(
實驗羊 2020-4-9 17:00:56 少尾機

Ads

任平生 2020-4-9 17:26:18 想搭單問下vue同JQuery 可唔可以同時使用的
:^(

原因係舊底野用緊JQuery 而家可能想慢慢轉
Code到直 2020-4-9 18:09:34 agent 真係死唔斷氣
:^(
ミクミク99 2020-4-9 18:25:06 咁叫個agent等食屎
:^(