Skip to main content
deleted 12 characters in body
Source Link

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }\$\{(a,b) \in \mathbb{R}^2 : a\pm b=0 \text{ or } a\pm b = -1\}\$. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
rfc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # rfc = 1/4c
c = 1/(rfc + rfc + rfc + rfc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# rfc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of rfc (Reciprocal-Four-C) is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
rfc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into rfc, it's really 1/((a+b)*(a+b) + a + b - (a-b)*(a-b) - a + b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that rfc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times rfc, so 1/(4/(4*a*b)) becomes a*b.

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
rfc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # rfc = 1/4c
c = 1/(rfc + rfc + rfc + rfc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# rfc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of rfc (Reciprocal-Four-C) is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
rfc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into rfc, it's really 1/((a+b)*(a+b) + a + b - (a-b)*(a-b) - a + b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that rfc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times rfc, so 1/(4/(4*a*b)) becomes a*b.

29 operations

Does not work for the set \$\{(a,b) \in \mathbb{R}^2 : a\pm b=0 \text{ or } a\pm b = -1\}\$. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
rfc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # rfc = 1/4c
c = 1/(rfc + rfc + rfc + rfc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# rfc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of rfc (Reciprocal-Four-C) is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
rfc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into rfc, it's really 1/((a+b)*(a+b) + a + b - (a-b)*(a-b) - a + b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that rfc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times rfc, so 1/(4/(4*a*b)) becomes a*b.
renamed foc due to flash of inspiration
Source Link
algorithmshark
  • 8.8k
  • 2
  • 33
  • 55

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
focrfc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # focrfc = 1/4c
c = 1/(focrfc + focrfc + focrfc + focrfc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# focrfc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of focrfc (Reciprocal-Four-C) is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
focrfc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into focrfc, it's really 1/((a+b)*(a+b) + a+ba + b - (a-b)*(a-b) -a+b a + b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that focrfc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times focrfc, so 1/(4/(4*a*b)) becomes a*b.

I don't know why I called it foc. At first I thought it was 4/c (Four-Over-C) but that was just my head being muddled by reciprocal logic. Whoops.

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
foc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # foc = 1/4c
c = 1/(foc + foc + foc + foc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# foc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of foc is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
foc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into foc, it's really 1/((a+b)*(a+b) + a+b - (a-b)*(a-b) -a+b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that foc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times foc, so 1/(4/(4*a*b)) becomes a*b.

I don't know why I called it foc. At first I thought it was 4/c (Four-Over-C) but that was just my head being muddled by reciprocal logic. Whoops.

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
rfc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # rfc = 1/4c
c = 1/(rfc + rfc + rfc + rfc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# rfc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of rfc (Reciprocal-Four-C) is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
rfc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into rfc, it's really 1/((a+b)*(a+b) + a + b - (a-b)*(a-b) - a + b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that rfc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times rfc, so 1/(4/(4*a*b)) becomes a*b.
explanations yay
Source Link
algorithmshark
  • 8.8k
  • 2
  • 33
  • 55

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
foc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # foc = 1/4c
c = 1/(foc + foc + foc + foc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# foc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of foc is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
foc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into foc, it's really 1/((a+b)*(a+b) + a+b - (a-b)*(a-b) -a+b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that foc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times foc, so 1/(4/(4*a*b)) becomes a*b.

I don't know why I called it foc. At first I thought it was 4/c (Four-Over-C) but that was just my head being muddled by reciprocal logic. Whoops.

29 operations

sum = a+b
nb = -b
diff = a+nb
foc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # foc = 1/4c
c = 1/(foc + foc + foc + foc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# foc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of foc is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
foc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into foc, it's really 1/((a+b)*(a+b) + a+b - (a-b)*(a-b) -a+b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that foc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times foc, so 1/(4/(4*a*b)) becomes a*b.

I don't know why I called it foc. At first I thought it was 4/c (Four-Over-C) but that was just my head being muddled by reciprocal logic. Whoops.

29 operations

Does not work for the set { (a,b) ∈ R2 | a+b = 0 or a+b = -1 or a-b = 0 or a-b = -1 }. That's probably measure zero?

sum = a+b
nb = -b
diff = a+nb
foc = 1/(1/(1/sum + -1/(sum+1)) + -1/(1/diff + -1/(diff+1)) + nb + nb)  # foc = 1/4c
c = 1/(foc + foc + foc + foc)

# sum  is  2: =+
# nb   is  2: =-
# diff is  2: =+
# foc  is 18: =///+-/++-//+-/+++
# c    is  5: =/+++
# total = 29 operations

The structure of foc is more evident if we define a macro:

s(x) = 1/(1/x + -1/(x+1))              # //+-/+ (no = in count, macros don't exist)
foc = 1/(s(sum) + - s(diff) + nb + nb) # =/s+-s++ (6+2*s = 18)

Let's do the math:

  • s(x), mathematically, is 1/(1/x - 1/(x+1)) which is after a bit of algebra is x*(x+1) or x*x + x.
  • When you sub everything into foc, it's really 1/((a+b)*(a+b) + a+b - (a-b)*(a-b) -a+b + (-b) + (-b)) which is just 1/((a+b)^2 - (a-b)^2).
  • After difference of squares, or just plain expansion, you get that foc is 1/(4*a*b).
  • Finally, c is the reciprocal of 4 times foc, so 1/(4/(4*a*b)) becomes a*b.

I don't know why I called it foc. At first I thought it was 4/c (Four-Over-C) but that was just my head being muddled by reciprocal logic. Whoops.

explanations yay
Source Link
algorithmshark
  • 8.8k
  • 2
  • 33
  • 55
Loading
Source Link
algorithmshark
  • 8.8k
  • 2
  • 33
  • 55
Loading