# Testing code tags

**URL:** https://boards.straightdope.com/t/testing-code-tags/796468
**Category:** About This Message Board
**Created:** [September 16, 2017, 3:04pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468 "2017-09-16T15:04:26Z")
**Posts on this page:** 1
**Showing post:** 36

<div class="post-metadata">

### Author: ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)
#### Post date: [October 11, 2017, 1:03am UTC](https://boards.straightdope.com/t/testing-code-tags/796468/36 "2017-10-11T01:03:12Z")

</div>

> [@dstarfire](#):
>
> 1. give us an example
> 
> and
> 
> 1. Are you TRYING to create source material for a sequel to The Da Vinci Code?!

(1) That Python depends on indentation destroyed when Sultan-theme gets its hands on it is not in dispute:

> [@](#):
>
> One of the most distinctive features of Python is its use of indentation to mark blocks of code.

Here is some C code I posted recently

> [@Logarithmic Tables](https://boards.straightdope.com/t/logarithmic-tables/793079/11):
>
> Here is some real C code to compute (_but with no error-checking_) logarithm base _e_.
> 
> ```auto
> 
> /*
> * This code is loosely based on Freeware;
> * x_log() is similar to log() but does no error-checking.
> * x_frexp() accomplishes the built-in function frexp()
> * but is much slower. It is included to make this
> * wholly self-contained.
> * No copyright is claimed by Septimus G. Stevens VII.
> * Use of this code for satiric purposes is encouraged.
> */
>  
> double x_frexp(double x, int *xpon)
> {
> int	xp = 0;
> while (x >= 1)
> x /= 2, xp++;
> while (x < 0.5)
> x *= 2, xp--;
> *xpon = xp;
> return x;
> }
> 
> double x_log(double x)
> {
> double z, w;
> int xpon;
> 
> x = 1.4142135623730950488 * x_frexp(x, &xpon);
> z = 2 * (x-1) / (x+1);
> w = z * z;
> x = z;
> z *= - w * 64.124943423745581147
> + w*w * 16.383943563021534222
> - w*w*w * 0.78956112887491257267;
> z /= -769.49932108494879777
> + w * 312.03222091924532844
> - w*w * 35.667977739034646171
> + w*w*w;
> return x + z + xpon * .69314718055994530941
> - .3465735902799726547;
> }
> 
> int main(int argc, char **argv) { double atof(); printf("Log_e of %f is %f
> ", atof(argv[1]), x_log(atof(argv[1]))); }
> 
> ```

That function lacked a main() for test purposes, so I’ve appended one at the bottom, already sultanized.

Sultanize, copy-paste, compile, and type ‘a.out 23.14069263’ to verify that _this_ code can withstand Sultan’s destructive efforts.

(2) I haven’t a clue what your point is. But with approximately 99% of the world’s writing now transcripts from inportant intellectuals like Alex Jones, and gibberish from social media, I don’t think future conspiracists will have lack source material!

---

_[View the full topic](https://boards.straightdope.com/t/testing-code-tags/796468)._
