Newsgroups: fj.lang.c,fj.net.programming
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!aist-nara!odins-suita!news.cs.ritsumei.ac.jp!news.kpu-m.ac.jp!cancer.nca5.ad.jp!sakura.kudpc!hakata!ie.u-ryukyu.ac.jp!newshost.ryukyu.ad.jp!sour!merope!void
From: void@merope.opus.or.jp (Kusakabe Youichi)
Subject: Re: =?iso-2022-jp?B?QxskQjhAOGw2NSQoJEYkLyRAJDUkJBsoQg==?=
Message-ID: <1997Oct5.091752.3436@merope.opus.or.jp>
Followup-To: fj.lang.c
Organization: Macintosh User Group PLEIADES in opus
X-Newsreader: TIN [version 1.2 PL0]
References: <615c7c$js1$1@nw012.infoweb.or.jp>
Date: Sun, 5 Oct 1997 09:17:52 GMT
Lines: 31
Xref: galaxy.trc.rwcp.or.jp fj.lang.c:5093 fj.net.programming:29
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.c&nb=5093&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B3g8L$NFbB&$N6uGr$r$J$/$9$H!"(B

#include <stdio.h>
#include <math.h>
#define N_DATA 1024

main()
{
double n;
FILE *fp;
int i;

fp = fopen("test.dat", "wb");

for (i = 0; i < N_DATA; ++i) {
n = cos(2 * 3.1415926539 * (double)i / N_DATA);
fwrite(&n, sizeof(double), 1, fp);
}
fclose(fp);
}
$B$G$7$g$&$+!#(B
double$B$N@:EY$C$F$I$l$0$i$$$G$7$?$C$1(B? 3.14159265358979323846 $B$0$i$$$OI,MW(B?
($B$=$b$=$b(Bcos()$B$,$I$&4X78$7$F$/$k$N$G$7$g$&$+(B)
fopen$B$NLa$jCM$OI,$:(BNULL$B$+$I$&$+$r%A%'%C%/$7$^$7$g$&!#(B

$B$"$^$j%;%s%9$N$$$$=PBj$8$c$"$J$$$G$9$M!#(B

  $B%X(B_$B%X(B   ________________________
$B%_!&!&(B $B%_(B  void@merope.opus.or.jp
 (  $B!k(B )$B!A(B            $BF|2<ItM[0l(B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
