Looks like I lost my shot at this one: codegolf.stackexchange.com/a/37136/8478 ... but would anyone like to help me figure out where I went wrong (and subsequently post the correct key)?
The denominator in d and e can be an integer in the range [2,51], giving 50 independent values for each of them.
The denominator in f can be anything, but for sufficiently large atan2, f won't differ by a significant amount of digits. so I picked an integer range [-400,400] for the denominator.
Then I converted each of these integer ranges into a double range (using 180-360.0/n) and just applied his final four lines (translated to mathematica) to the outer product of the three resulting lists.
I think the only mistake I could have made is in the parameters to Range
user55340
I know some people like writing code contests... stumbled across one that I've poked at before but didn't do anything with... Arithmetical Croquet based on a game invented by Lewis Carroll.
"The denominator in f can be anything, but for sufficiently large atan2, f won't differ by a significant amount of digits. so I picked an integer range [-400,400] for the denominator."
okay, so the only things that could be wrong: 1) my mathematica implementation of his java code 2) the assumption that every integer in those ranges will be hit
well, I can't crack this (at least, it's evident that it would take hours of work, if it's even possible), but I thought of a good idea for a submission
What's Average Anyways?
code-golf
When people use the term "average," they generally mean the arithmetic mean, which is the sum of the numbers divided by the number of numbers. There are, however, many more meanings to the word "mean," including the harmonic mean, the geometric mean, the arith...
Hey guys. We've got a question on Code Review that no one really know how to review. We don't see much brainfuck. I thought maybe there's an expert here who might like to take a crack at it.
Inspired a bit by a previous Brainfuck question and the recent fizzbuzz invasion, I decided to make FizzBuzz in Brainfuck.
The code is entirely my own, except for the inclusion of the Printing a number algorithm that I found on StackOverflow.
My code is divided into several parts.
Setup Const...
The x86 instruction set has been extended several times, introducing wider registers and datatypes as well as new functionality
== x86 integer instructions ==
This is the full 8086/8088 instruction set, most, if not all of these instructions are available in 32-bit mode, they just operate on 32-bit registers (eax, ebx, etc.) and values instead of their 16-bit (ax, bx, etc.) counterparts. See also x86 assembly language for a quick tutorial for this processor family. The updated instruction set is also grouped according to architecture (i386, i486, i686) and more generally is referred to as x86_32...
There are several major downsides to using assembly, mostly that 1) You can't optimize as well as a C compiler and 2) your code is by definition not portable
The GNU Assembler, commonly known as gas or simply as, its executable name, is the assembler used by the GNU Project. It is the default back-end of GCC. It is used to assemble the GNU operating system and the Linux kernel, and various other software. It is a part of the GNU Binutils package.
The GAS executable is named as, the standard name for a Unix assembler. GAS is cross-platform, and both runs on and assembles for a number of different computer architectures. Released under the GNU General Public License v3, GAS is free software.
== General syntax ==
GAS supports a general syntax that works...
is worth checking out as well; it says that it can be targeted to multiple platforms
Does anyone here know anything about the .wav format? I'm taking on an incredibly silly project and I'd like to know if .wav files have a minimum sample rate.
It looks like VLC is happy with a sample rate of 2. The problem is that it doesn't play any sound. I'll have to read up on how the data bytes in .wav files are formatted.
@undergroundmonorail you are effectively positioning the speaker, and it is the motion of the speaker that creates pressure waves in the air that is the sound
Hm. I'm trying to make this easy on myself because my end goal is to output .wav files from brainfuck. That's why I wanted a low sample rate: Less work when I write that.
(my reckoning would be if you want a 20Hz wave, you need atleast 40Hz sample rate, and you get a (horrible) triangle wave or whatever it is actually called)
In the field of digital signal processing, the sampling theorem is a fundamental bridge between continuous signals (analog domain) and discrete signals (digital domain). Strictly speaking, it only applies to a class of mathematical functions whose Fourier transforms are zero outside of a finite region of frequencies (see Fig 1). The analytical extension to actual signals, which can only approximate that condition, is provided by the discrete-time Fourier transform, a version of the Poisson summation formula. Intuitively we expect that when one reduces a continuous function to a discrete sequence...
@Doorknob GCD is a good one. There's no really clean way of doing it in GS, but you can pick one approach and ask whether it can be improved.
BTW could one of the people who voted to reopen codegolf.stackexchange.com/questions/36802/… , and thus presumably thinks it's clear what the question is, answer the questions in the comments?
I can't figure out why this .wav file won't play. It should be 1 second of an 80hz tone. VLC can figure out that it's 1 second long, but just plays silence.