« first day (2614 days earlier)      last day (2215 days later) » 
00:00 - 14:0014:00 - 00:00

12:17 AM
0
Q: Permutations such that no k+2 points fall on any polynomial of degree k

Peter KageyDescription Let a permutation of the integers {1, 2, ..., n} be called minimally interpolable if no set of k+2 points (together with their indices) fall on a polynomial of degree k. That is, No two points fall on a horizontal line (0-degree polynomial) No three points fall on a line (1-degre...

 
12:31 AM
what do people think of a pseudopod controlling style koth thingy
features: awareness of shape, awareness of touching things, possibly awareness of almost touching things, awareness of magnetic field, some sort of awareness of food stuff
amoeba style*
 
12:53 AM
0
A: Sandbox for Proposed Challenges

l4m2Common Logic Gates To make a common 1-to-1 gate, you circuit at least 2 input: F=A XOR B For a buffer gate, let A=0 and B=Input1; for a not gate, let A=1 and B=Input1. To make a common 2-to-1 gate, you circuit at least 4 input: (The two inputs are represented as a and b) F=(A IF B ELSE C) X...

 
@NewSandboxedPosts @everyone Review this carefully please, or l4m2 is going to complain that the sandbox is useless (which it almost is).
 
1:14 AM
@Downgoat The background blends seemlessly with the top bar at the edges but not in the middle because it's a gradient and the top bar isn't, and it looks kinda off.
Other than that it looks nice
Also codegolf.vihan.org is throwing 502 bad gateway
 
1:38 AM
I'm planning on posting this tomorrow. Is there anything further people would like to say?
 
do we have an esolang with base phi numbers?
 
Not that I know of.
How would that work?
 
Golden ratio base is a non-integer positional numeral system that uses the golden ratio (the irrational number 1 + √5/2 ≈ 1.61803399 symbolized by the Greek letter φ) as its base. It is sometimes referred to as base-φ, golden mean base, phi-base, or, colloquially, phinary. Any non-negative real number can be represented as a base-φ numeral using only the digits 0 and 1, and avoiding the digit sequence "11" – this is called a standard form. A base-φ numeral that includes the digit sequence "11" can always be rewritten in standard form, using the algebraic properties of the base φ — most notably...
how would it not?
 
APL!
Phinary in dfns, that's a thing, I think
 
ok but i kind of meant as the only numeric type
or maybe only type
 
1:43 AM
Huh? A base is not a type.
 
no i meant like
 
Ah, only representable by phinary
 
oooh yes, I too desire an esolang based on phinary
 
So instead of decimal, you use phinary for everything
How the flipwould you do anything?
 
1:44 AM
Representable? I'm still not following.
 
you have to write all your integers in phinary
and reals as well
 
"So instead of decimal, you use phinary for everything"
 
Would you have a way or representing numbers with repeating phinary expansions?
 
which is a bit more powerful, having phi and stuff
 
But you don't use decimal for anything, except numeric literals.
 
1:45 AM
because if you don't you are not going to get an integer
 
@user56656 wrong
 
@DestructibleLemon Except basically no integers can be exactly represented
 
@Zacharý wrong
 
@DestructibleLemon other than zero
 
wrong
look at the examples part on the wikipedia page
 
1:47 AM
It's possible using decimal positions, I calculated 1-12 in phinary once for fun
 
it's due to special properties of phi
phi -1 = 1/phi i think it was
 
I feel like in order to be truly different though, the language needs to have a memory model based on the golden ratio somehow
 
you can convert any integer to phinary with a limited number of fractional digits
@ETHproductions it does though, doesn't it?
 
Well... reals are going to be fun: try 1/2
 
because with regular integers, you can't represent the golden ratio
@Zacharý hmmmm
 
1:48 AM
@Zacharý 1/10.01
 
> No non-integer rational number can be represented as a finite base-φ number.
 
As a literal
 
Try representing 1/3 as a literal in decimal
 
Why would that matter? You can't... ninja'd
 
Base 30 is best base.
 
1:49 AM
Base 210 is clearly superior.
 
Babylonians were probably perfectly BASED in reality... (base 60)
 
why not base 2^8
 
decimal with limited fractional: can't represent any irrational numbers, vs phinary with limited fractional: can represent some irrational numbers, can't represent any non-integer rationals
 
No. Base <product from i = 1 to n of p_n>
 
@DestructibleLemon It would probably better to just have phi as the only literal and allow things like exponentiation, addition an multiplication.
 
1:51 AM
@DestructibleLemon Those last two contradict each other.
 
^^
 
wrong word haha
@user56656 nice idea
 
there is still a mistake
 
not sure about exponentiation though
 
Making 1 from phi is very easy.
 
1:52 AM
@DestructibleLemon I think you are right.
 
φ/φ, for one
 
phi^(phi-phi)
Nope
 
φφ-φ without division or exponentiation.
 
I was about to say, you were using 1 to make 1.
 
@Dennis standard form: 100 - 10 = 1
 
1:55 AM
your left hand is in phinary and your right in decimal?
 
where 100 = 11 in non standard form
 
100 - 10 = 90 and that's that.
 
On the topic of bases: dozenal folk are insane. I'm just going to say that now.
 
very funny dennis
misinterpreting numbers in a different base.
 
brb, finding SUBSCRIPT GREEK SMALL LETTER PHI
 
1:57 AM
I'm not trying to be funny. Using 100 to designate anything but the number one hundred is only going to cause confusion.
 
how do you use subscripts in chat
 
I don't believe you can do subscript or superscript in chat
 
I'm afraid that's not possible.
 
Possibly relevant: Radixal!!!!, a language which interprets numeric literals as being in the smallest base that includes every digit in the literal, and can't handle any numbers other than what can be represented by numeric literals.
 
well then there's going to be an issue denoting base with subscripts
 
1:59 AM
@DestructibleLemon Use LaTe...oh
 
Without using the corresponding Unicode sub/super versions of the characters
 
TEH UNICODE
 
@Zacharý not really
 
I was literally just helping hack together a quizlet for physics by (ab)using unicode
 
Dear Unicode, I'm not saying subscript phi is an everyday necessity, but if we have levitating businessman in suit...
 
2:00 AM
SI's a thing
 
Found it: 100ᵩ
May just be a box on some computers/browsers
 
Awesome!
 
10ᵩ/10ᵩ
 
I can't believe it. It renders correctly on my desktop and my phone.
 
This is why unicode is a thing. So we can muck around with random symbols and cover someone's screen with junk.
 
2:02 AM
Monospace: 10ᵩ
 
Does the subscript small gamma look like a subscript small y to you guys as well?
 
.oO ( My phone can't handle superscript 4, but subscript phi works just fine. )
 
a̧̤̺͋̉͠l̠͔̘̒́͘l̛̗̻̲̊͝ ̢̻̓͐̄ͅh̬̱̳̀̈́͆a̹͎̱͒̅͒ḯ̡̹͚͗̚l̤͚̽̀̋͜ ̜̞̘͛̾͠ű̫͍̘͂͗ṋ̳͉̅̀͒ḯ̦͎̣̾͂c̘̪̓̏̈́͜o̫̻̘͑̍͝d̹͇̀̈́͛͜ȩ̯̩̾́̾
 
Linguists be crazy
NO ZALGO
 
why does monospace render it as psi??
 
2:04 AM
Why did unicode think stacking symbols like that was necessary
that's my question
 
@moonheart08 it's extensible, and if it happens to have a possible use as crazy characters, does it really matter?
 
Linguists
 
@Dennis Well, subscript phi is in the Phonetic Extensions block, which is probably more widely supported than the Superscripts and Subscripts block.
 
The answer to all unicode questions are either A) random script. or B) Linguists use it
 
How about i ask chat instead, because i'm unsure
> I think it's better to use 1 side unbounded, as that's usually the convention i think
is it better to have a one side unbounded brainfuck tape, or a two side
:p
 
2:06 AM
Are you talking about your BF -> ASM challenge?
 
Yea.
 
at the same time it's also convention to have only 300000 or something which i don't really like
 
Doubly-infinite is going to be a bit painful.
 
True.
 
I had thought "now I just need to find a subscript 10" before realizing how dumb I am...before realizing how Unicode has already pre-anticipated everyone's dumbness: 100⏨
8
 
2:08 AM
How do you use the SE API?
Given a question Q, I want to find a number N such that the time difference between the Nth and (N+1)th answer is maximized.
 
It is just now i realised doorknob's icon is a doorknob, not two oranges
4
 
mdr lol
 
@ETHproductions it's like that "where's the 11 button" joke thing i guess
it doesn't actually render for me though
 
If only there were a subscript f. Oh well, digamma'll have to do
 
@DestructibleLemon yes, it's in Miscellaneous Technical, which is in the U+2xxx range with Subscripts and Superscripts and is probably even less supported
 
2:10 AM
CMP: Favorite Unicode character?
Mine is ☐
 
It shows up as a bo... oh
 
@ETHproductions shhh
 
ngn
@Zacharý there's a word for that: primorial :)
 
APL all over again
 

· ͜ᔱ
2
oh god
 
2:23 AM
I suspect this looks slightly different to you
 
2:38 AM
@EsolangingFruit the scribbles is a letter punctuation???
 
@ETHproductions Nope, it looks pretty much exactly like this.
It's a face.
 
yeah, I get that... specifically I thought the eyes might be located differently
 
@ETHproductions i thought the "oh god" is because it looked like that after they copy pasted it
 
The "oh god" is because it's horrible.
Worse than the lenny face
Please don't let this spread
 
@DestructibleLemon ...why am I so oblivious
 
2:49 AM
@EsolangingFruit you're the one who posted it in chat
whoops wrong button
 
3:17 AM
0
A: Sandbox for Proposed Challenges

R.MInterpret pseudocode Wikipedia says pseudocode is intended for human reading rather than machine reading. and A program in pseudocode is not an executable program. I don't care. Make a pseudocode interpreter that can run pseudocode that fits the rules described below*. This is based...

 
4:05 AM
@EsolangingFruit because it barely even looks like a face
 
@EsolangingFruit get a key from StackApps, hit up /questions/{id} with a filter that includes .items;question.answers;answer.created_at
Er sorry it's answer.creation_date.
 
ngn
4:47 AM
CMP: Does anybody license their esolang under something other than the MIT/BSD or the GPL?
 
Filter is 9NsGIrVA0QqUf so once you get your key you do GET api.stackexchange.com/2.2/questions/{}?key={}&site=codegolf&filter=9NsGIrVA0QqUf‌​
output will look something like {"items": [{"answers": [{"creation_date": ...} , ...]}]}
 
@quartata I asked my dad (who has worked with C++ on Windows for the past couple decades), and he tells me EPIPE is defined for POSIX compatibility but errno will never actually be set to EPIPE. Instead you just check the return value of printf or write or whatever and if it's negative you have a broken pipe.
 
makes sense
sounds like the kind of thing they'd do to annoy people
 
SIGPIPE, however, isn't defined by signal.h so you just get a compiler error if you try to handle it.
 
(tbh POSIX errors are kind of all over the place, but I'd say that a negative value is vaguer than some constant)
the only signal is like SIGINT I think
 
4:50 AM
Well there's different negative values for different errors
There's prolly a list somewhere
 
really just hides the Win32 send ctrl-c thing
 
On Windows, signal.h defines SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, and SIGTERM
 
I don't think you can actually use most of those though
like there's no way setting up a handler for SIGFPE works
 
But you can probably handle ABRT, INT, and TERM
 
I should try it actually
Definitely INT and TERM. I think you can also raise those but you can't send them to other processes if I'm not mistaken
pretty sure it's all username is the point
 
4:58 AM
:| perl is hard to golf
 
Regular, idiomatic Perl comes pre-golfed. You just have to remove whitespace.
 
that's a little unfair
 
sure. but i'm not even writing idiomatic Perl anymore and I'm still 3 bytes away from Ton Hospel
 
sometimes you have to remove braces too
@ASCII-only can I see?
or is this anagol
 
code-golf.io, so basically like anagol just different
 
5:00 AM
is that ppcg v4.20
or whatever
 
not exactly (it isn't PPCG at all)
but close enough
 
oh, no this is different
I was thinking it was the thing mego was making
 
That's not near done yet
And currently is broken with 502 bad gateway
 
more like 200 not ok
does nginx throw a 502 when doing WSGI? probably
 
Unrelated: Does anyone know if it's still possible to get Halo 1 for PC anywhere
 
5:06 AM
@quartata the only braces i have are for a block
 
@Pavel gotta get a disc
 
Damn
 
I don't think they still make those
 
well obvs
try Amazon?
 
5:08 AM
can't the illegal copy lads help with that?
 
I generally try to avoid straight-up piracy
 
game is way too modern to just shrug it off and say "well I have no choice" imo
 
@quartata ಠ_ಠ It's $45, You know what else is $45? The Master Chief collection and Halo 5 for the xbone, combined, brand new.
 
pretty sure it retailed for $50
 
My dislike of playing shooters with a controller (Halo Anniversary for 360, $20) is battling with my dislike of spending $45
 
5:13 AM
(CE that is)
you can probably get it for cheaper on ebay somewhere
 
I wonder if there are working xbone emulators that can run the Master Chief collections
There's Xemu1 but IDK how good it is
 
"xbone emulator" so Windows 8?
once you actually get the executable
 
@quartata Wait, seriously?
 
you're not going to get to play with KB+M in an emulator at any rate
 
Windows natively runs Xbox games?
 
5:17 AM
@Pavel probably
or at the very least with little abstraction
 
@ngn I always intend for public domain, but I usually release it without a license because I forget.
 
@EsolangingFruit ...
@EsolangingFruit pls add license asap ty
 
@Pavelto To clarify, I was mostly making fun of Windows 8 and metro
 
@quartata I looked it up, the xbone actually runs unmodifed Windows 8.
 
well there you go
I know there's additional APIs other than DirectX though
 
5:21 AM
There are lots of hacks to get PC games to run on an Xbox, but I can't find anything that lets you go the other way.
 
@ASCII-only brb unlicensing everything
 
@EsolangingFruit no license means implicit copyright, other than that you gave up the right for forking by agreeing to github's terms of service
(definitely not a lawyer)
 
yeah that's probably why they're adding the unlicense to all their repos :P
 
unlicense != no license
 
oh. right. that license.
 
5:24 AM
fun fact: github has unlicense as one of its builtin options
 
or you can do creative commons
 
Creative Commons doesn't work with software
They actually explicitely tell you not to use CC, and suggest alternative licenses (GPL, MIT, whatever) based on the equivalent CC license.
 
ngn
@Pavel what? why?
 
You know, I have no idea.
 
5:27 AM
@ASCII-only If you copyright your code and use a restrictive license, nobody can use it.
If you write horrible, worthless code, nobody can use it.
 
ngn
@Pavel I was tempted to use one of theirs
 
It amounts to the same thing, as far as I'm concerned.
 
I just remember I was trying to use something licenced under CC-Share Alike and figured out I was supposed to use GPL.
That said, this was a year ago so my reccollections are a bit fuzzy.
 
CC0 definitely works
GH has it as an option
(see above)
 
5:30 AM
CC0 works, it might be something to do with the wording of one of the specific restrictions or something
@quartata Per ^^, CC0 is explicitely listed as being the one CC license that works with software.
 
yeah share alike is different
 
ngn
CC0 is practically public domain - it doesn't even require attribution
 
It literally is public domain iirc
IMO, open source software licensing is pretty simple. GPL if you sleep with nunchucks under your bed and MIT otherwise.
 
ngn
@Pavel I need something rather more restrictive
@Pavel like cc-by-nc-nd (no commercial use, no derivative works) for software
I guess I could just default to "all right reserved" and promise people not to sue them for just trying out my interpreter...
 
What's wrong with derivative works?
 
ngn
5:45 AM
@Pavel good question, I'm not really sure, maybe it's just irrational fear of losing control
 
I'm pretty sure putting your code on GitHub means you allow anyone to fork it anyway.
> Any User-Generated Content you post publicly, including issues, comments, and contributions to other Users' repositories, may be viewed by others. By setting your repositories to be viewed publicly, you agree to allow others to view and "fork" your repositories (this means that others may make their own copies of Content from your repositories in repositories they control).
So if you use GitHub nonderivative isn't possible.
 
ngn
@Pavel hm... "make their own copies" is not necessarily "derivative work"
 
Anyone who submits a PR has to create modified version of your software, which is definitely derivative, and I don't think you want to disallow that.
 
ngn
@Pavel they say that if you don't use a licence, "the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work."
 
Mm
Which means they can't make PRs
I wonder if the lack of a license file has ever stopped anyone from opening a PR on github
 
ngn
5:56 AM
@Pavel Under Settings there's a checkbox "restrict editing to collaborators". I'm not sure what it does but it might be relevant.
 
I don't think that affects forks
 
0
A: Sandbox for Proposed Challenges

Jo KingSelf-Transformer cops-and-robbers The cops task is to write a full program that, when given an input of itself, outputs a finite deterministic string. This program must give a different output if given a different input. Rules: Submissions consist of Language name If any flags are used, t...

 
ngn
@Pavel well, technically nothing (other than the Berne convention) can stop others from copying your software, doing derivative work, and publishing a separate repository with their changes, on github or elsewhere
 
Someone should make a license where you can make derivative works, but the original author still get control over such works.
 
ngn
6:12 AM
@Pavel a dual GPL/commercial licence is closest to that - you get some control over how the derivative work is licensed, yet not over whether such work is done or not
 
6:56 AM
I know it's usually best to wait at least a couple of days before you post your own answer, but is this also the case when you want to post it as an example answer? I'm doubting whether I should add the example answer to the question itself, post it as the first answer, or just not post it at all and let others answer first.
 
@KevinCruijssen I don't think that many people really mind
 
7:46 AM
0
Q: Ticking Quine-Bomb!

Kevin CruijssenChallenge: Create a program or function that takes an integer input, which outputs a new program/function as specified below. Input: Integer n: Time in seconds before the Time Bomb explodes. Output: The original program which had the time in seconds n as input, will output a new program/func...

 
8:43 AM
CMC: (x+1/x)^n is a polynomial in x+1/x. compute the polynomial for input n
 
what does 'polynomial in ...' mean?
 
oops
CMC: x^n+1/x^n is a polynomial in x+1/x. compute the polynomial for input n
@Cowsquack it means, there is a polynomial p(y) s.t. p(x+1/x) = x^n+1/x^n
 
So, just like how "f(x) is a function in x".
 
yes
 
@Riker @betseg /r/WeatherGifs/ 8/10
 
8:54 AM
@LeakyNun these seem to be Chebyshev polynomials with some rescaling
 
interesting
 
you can substitute x=e^(it)
 
is n always an integer?
 
Of course.
(otherwise it would not be a polynomial)
Unfortunately Jelly doesn't have "solve equation"...
(but at least it have "matrix inverse")
Which can probably do something useful.
 
huh, it's not on oeis
 
9:08 AM
@flawr already subbed
 
9:48 AM
so the coefficients would be from a^0 to a^n... (a = x+1/x)
                      |  1
                      |      1
                      |  2       1
                      |      3       1
                      |  6       4       1
                  (x) |  (.....)
----------------------+
a_0 a_1 a_2 a_3 (...) | x_0 x_1 x_2 x_3 (...)
 
looks like the pascal triangle
 
Half of it.
 
slightly more than half:)
 
what is x_i?
 
how did you compute them?
 
9:56 AM
The coefficient of x^i.
(note that the operation denotes matrix multplication) (correct?)
Assume the matrix is invertible, just invert it and multiply by [0 0 0 0 ... 0 0 1].
 
10:07 AM
... There is matrix power and not matrix inverse ...
22.
 
mind explaining what your jelly does?
 
[0 0 0 0 ... 0 0 1] (matrix-multiply) ( <THE MATRIX> (matrix-power) -1 )
Element (x,y) of the matrix (0-based) is (y (binomial-coefficient) ((y-x)/2)) if it's integer, 0 otherwise.
 
is that what æ*-æ×@Ṭ does?
 
æ*- raises to -1'th power. æ× is matrix multiplication, takes n+1 and return [0,0,..,0,1] where there are n zeroes.
 
10:23 AM
@flawr converges to half :P
 
I wonder if directly computing the inverse matrix take less bytes...
 
why do you take the inverse of the matrix?
 
... wait a minute ...
I think it's wrong.
Basically it's possible to compute (x) from (a), so to do the inverse...
... nevermind it's correct.
 
11:01 AM
3
Q: Digits in their lanes

Kevin CruijssenInput: A list of integers Output: Put each digit (and the minus sign) in it's own lane, in the order -0123456789, ignoring any duplicated digits. Example: Input: [1,729,4728510,-3832,748129321,89842,-938744,0,11111] Output: -0123456789 <- Added as clarification only, it's not part of the ...

 
11:20 AM
-2
Q: P (X) = -x^3 + x^2 + a·x - 3 / x+1 doubts

davidCould you confirm if the remainder = 1 and a = 22/3? Thanks!

 
@NewMainPosts Didn't delete fast enough...
-4
Q: Is it a valid 7-seg solution?

l4m2Program used to visualize the circuit: link. (remove first 844 bytes and decompress as rar archive) In the challenge Make a BCD to 7SEG chip, you're asked to design a circuit that will convert from the BCD representation to 7-segment number representation. Given a decimal digit in BCD format...

Can anyone look at that and see if there are still any unclear parts?
(yes, strict input format is not encouraged, but that's not a reason to close)
Seriously, vote to close as "unclear what you're asking" without leaving a comment is not nice. VTC should be used to "temporarily close it until it's fixed", but without a comment it's impossible to know what is wrong (assume the OP have read and understood their question).
 
12:04 PM
TIL: stackoverflow.com/a/33283121/3750388 . What a stupid idea. There go 3 hours of CSS debugging.
 
 
1 hour later…
1:10 PM
1
Q: Almost a Columbo episode

ArnauldYour task is to find two missing characters in a Columbo episode title. Input One of the 69 Columbo episode titles (as listed below), with exactly two characters replaced with *. Example: "Ran*om for a *ead Man" Output You may either return the full episode title, or just the two missing c...

 
1:27 PM
CMM: What to do with unclear close votes without comment?
 
0
A: Sandbox for Proposed Challenges

Magic Octopus UrnThat's MY Program Now Given the previous answer in the chain, write a program that outputs that program. The start of this challenge will be the following Brain-flak program: Brain-Flak, 148 bytes (((((((((((()()()()){}){}){}()))){}{}())[][][][])[][])[[]]())[[][][][][]]())([([]([])[][]{})]()...

 
You should say that "answerers should aim to maximize their score"...?
 
@user202729 Score really doesn't matter, or should it?
 
@LeakyNun do you have an intended solution for your cmc?
 
1:39 PM
@user202729 Your answer will be scored based on the size of the previous answer in comparison to your answer. You are aiming to maximize your score (the max being 1, there is no minimum).
Better?
 
@MagicOctopusUrn Then what should answers do? No winning criteria, nothing to optimize for... pop con maybe?
 
@user202729 It's answer-chaining. I thought those were sort of "hey, screw over the next guy or impress yourself while having fun"
 
Answer chaining is not a winning criteria.
(don't repeat the same "mistake" as the OEIS challenge :/ )
 
@user202729 What's the winning criteria of "One OEIS After Another"?
 
Second to last.
 
1:41 PM
@Cowsquack if you mean whether I have done it myself, no I haven't
 
@user202729 codegolf.stackexchange.com/questions/tagged/answer-chaining <-- None of the answer chaining questions have winning criteria added as tags.
 
"challenge that has a winning criteria, but no way to achieve it"
@MagicOctopusUrn Because they're not suitable. But they do have a winning criteria.
 
@user202729 Lol, I mean the winning criteria is highest score in mine, but it it doesn't fit into any tag either sooo...
 
(I hope my 22 bytes solution is correct)
@MagicOctopusUrn Tag != challenge content.
 
@user202729 Okay, so I have a winning criteria then lol.
 
1:44 PM
Isn't code-challenge usable for such cases as where no other tag fit?
 
Can't find any info on it. How do i check if a circle intersects with a point?
 
@moonheart08 "a point"?
 
Like, by equation?
 
The "circle" or the "disk"?
 
point on a 2D surface
 
1:46 PM
Plug the point into the equation lol.
 
@moonheart08 distance from the point to the center of the circle………?
I mean a point intersects a circle if it's on the circle so…
 
....i'm a moron. i had the circle circle collision code, and i couldn't think up how to check a point lol
 
compute the distance to every point on the circle, then check if the minimum is zero
 
@flawr ... O(inf) solution for a problem solvable in O(1) (arithmetic operations) ...
 
Circle = x^2+y^2=1, Point = (1,0) >_>?
 
1:48 PM
I feel like i might be able to drop the sqrt, but eh. (I like speed.)
That can wait
no point in premature optimization
 
@moonheart08 You can just square the other side...
 
i can no math. >_>
Thanks
 
(also be careful of numerical inaccuracy / floating point rounding error)
 
@user202729 This. Lol
 
In my case, a little inaccuracy is fine. If it turns out to be too inaccurate, i can change it back later
 
1:49 PM
@moonheart08 So instead of a==b use abs(a-b)<eps.
 
'eps'?
 
some very small value
 
Isn't that the usual way to check for floating point equality?
 
Is it faster than a normal equality check? No? Ok.
 
I wonder what programs would crash if you'd suddenly remove == for floating point comparison.
 
1:53 PM
The Powder Toy would probably just break hilariously instead
and crash 1 minute later from undefined behavior
 
No it isn't faster, but it can be useful sometimes.
 
mm
For situations where you need accuracy, i can see how
 
In general you also do not use the absolute distance, but a relative distance, something like abs(a-b)/abs(b) < eps, that way you can make sure it does work for a larger range
(provided you know that $b \neq 0$)
for example if you check for a given radius of a circle
 
00:00 - 14:0014:00 - 00:00

« first day (2614 days earlier)      last day (2215 days later) »