Re: "Larrabee" GPU design question.
- From: Muzaffer Kal <kal@xxxxxxxxx>
- Date: Sat, 14 Feb 2009 10:47:12 -0800
On Fri, 13 Feb 2009 08:55:41 +0100, Terje Mathisen <"terje.mathisen at
tmsw.no"> wrote:
Quadibloc wrote:
But I would like to have both the decimal point *and* the comma, for
typing lists of numbers separated from each others by commas. Perhaps
that key would have to generate a semicolon in Norway. Or a period,
since programming languages like BASIC may not be switchable to
Norwegian customization. (Although spreadsheets do conform to local
language rules nowadays.)
That's the real crux of the matter:
Even though written reports and spreadsheets insists on me using , and ;
instead of . and , all my programming languages use US rules.
This is a constant source of trouble when I'm writing out fp data from a
program, and the results are supposed to be imported into a spreadsheet.
:-(
At least in terms of comma and period difference, there is a solution.
Even if your program uses English locale for its constant etc, you can
set your output locale to what ever you want and get commas instead of
period if you want it. All libraries obey this setting. Changing the
output of your programs is relatively easy. In terms of comma vs
semi-columns to separate numbers, I'm not sure whether there is an
international setting for that but it's much easier to format your
output strings for a number separator.
Just a very small example:
#include <stdio.h>
#include <locale.h>
void main()
{
double f = 3.1415926;
char* l;
printf("%.16g\n", f);
l = setlocale(LC_ALL, "German");
printf("%s\n", l);
printf("%.16g\n", f);
}
.
- References:
- Re: "Larrabee" GPU design question.
- From: Quadibloc
- Re: "Larrabee" GPU design question.
- From: Ken Hagan
- Re: "Larrabee" GPU design question.
- From: Stephen Fuld
- Re: "Larrabee" GPU design question.
- From: Quadibloc
- Re: "Larrabee" GPU design question.
- From: Terje Mathisen
- Re: "Larrabee" GPU design question.
- From: Quadibloc
- Re: "Larrabee" GPU design question.
- From: Terje Mathisen
- Re: "Larrabee" GPU design question.
- Prev by Date: Re: "Larrabee" GPU design question.
- Next by Date: Re: "Larrabee" GPU design question.
- Previous by thread: Re: "Larrabee" GPU design question.
- Next by thread: Re: "Larrabee" GPU design question.
- Index(es):
Relevant Pages
|