3 ms·
This takes me back. I did the transcendental functions for a CPM C compiler in the early 80s using Chebyshev polynomials. My tutor failed my implementation bec
by mianos 4y ago
This takes me back. I did the transcendental functions for a CPM C compiler in the early 80s using Chebyshev polynomials.
My tutor failed my implementation because my code formatting was utterly crap. :) I am still laughing as there was no sin, cos in the maths library at all at the time.
- anonymousiam 4y agoI'm pretty sure that indent was around even in the early 80's. Even if you couldn't be bothered to run it, your tutor could have. Must not have been a very good tutor to fail you for style.
- Quarrel 4y agoHow sure? indent was written in 76, but didn't make it to BSD until 82. CP/M was first released in 74! It was a pretty different world.
- anonymousiam 4y agoI was using CP/M since about 1978, but you're right -- AFAIK there never was a port of indent to CP/M. I did make some assumptions, but developing for CP/M on CP/M was somewhat painful. There just wasn't enough memory space to work efficiently, or (often) even fit the compiled image into memory (<~60k after BIOS/BDOS/CCP on CP/M 2.2). Chebyshev polynomials certainly imply floating point, which could be a BIG memory hog with so little room. If I had the resources at the time, I would have undertaken such a development task on a more capable (Unix) platform. Such an environment would improve the ability for developing/debugging the optimizations required. As you say, indent was available in BSD since '82, and I know it was present on the Sun2 systems I used in '83.
- mianos 4y agoI had an Osborne 1. I had to swap disks multiple times to compile anything. I remember the C compiler by some guy, 'Walt Bolisvki'?, had the arguments passed in reverse on the stack (last on the top) and printf and friends ended up crazy hacks. I didn't have access to a Unix at the time or very limited open source so ident was not a thing.
- OnlyMortal 4y agoBit shifted sin values in a pre-made table of integers could be used so the maths was all integer based. Commonly used on processors like the 6502 or 68000 for vector graphics. It was accurate enough for games.
- richrichardsson 4y ago> It was accurate enough for games. Unless like me you made a typo when copying the table from a book and had a vector routine that mostly looked alright but would jerk slightly when that one value that was incorrect was chosen! <facepalm />
- mianos 4y agoIt was floating point math. There was nothing in the CPU to support it so it was ridiculously slow. But, sometimes you just want to have those functions to do some complex geometry.