Redian新闻
>
Question in C++ complex number implementation
avatar
Question in C++ complex number implementation# Programming - 葵花宝典
w*t
1
妈妈的眼睛得了老年性黄斑变性,好像是渗出性。曾经有出血现像,虽然跑遍杭州所有
知名主任医师,但是现在一只眼睛基本上看不见了,另外一只眼睛还可以维持没有明显
恶化。我研究了一下,好像没有什么根治的办法,这可能也是为什么中西医都看了很多
个,没办法挽救那只眼睛。我在美国也都出打听,得到的也都是我网上能查到的。这儿
的朋友如果有相关性比如在美国为父母医治过老年性黄斑变性的渗出性还是萎缩性,能
分享一下吗
万分感谢
avatar
n*n
2
呵呵
avatar
y*o
3
今天你好看吗?
avatar
r*e
4
I was reading the system library of complex number
and have some questions:
1) Should it be a class or a struc?
the system makes it a struc;
2) Although it is a struct, the system library provides
accessor functions such as real(), etc. why?
3) Why it is implemented as a template?
I would assume make it two doubles and type conversion
can take care of int and float, etc.
Thanks.
avatar
t*n
5
No drug is know to be able to reverse the disease.
Omega-3 fatty acids (e.g. fish oil, flaxseed oil supplements) with low
glycemic index diet may slow the progression.

【在 w*******t 的大作中提到】
: 妈妈的眼睛得了老年性黄斑变性,好像是渗出性。曾经有出血现像,虽然跑遍杭州所有
: 知名主任医师,但是现在一只眼睛基本上看不见了,另外一只眼睛还可以维持没有明显
: 恶化。我研究了一下,好像没有什么根治的办法,这可能也是为什么中西医都看了很多
: 个,没办法挽救那只眼睛。我在美国也都出打听,得到的也都是我网上能查到的。这儿
: 的朋友如果有相关性比如在美国为父母医治过老年性黄斑变性的渗出性还是萎缩性,能
: 分享一下吗
: 万分感谢

avatar
r*e
6
这人出名了

【在 n***n 的大作中提到】
: 呵呵
avatar
d*r
7
你这个叛徒,我告发,yelo去找卡伊去了。
avatar
N*m
8

Struct works well in legacy code, and it may cause less trouble in
transfering data.
Isn't it natural to have such a function?
Template was designed to solve such problems. But you still think
in the same old way.

【在 r***e 的大作中提到】
: I was reading the system library of complex number
: and have some questions:
: 1) Should it be a class or a struc?
: the system makes it a struc;
: 2) Although it is a struct, the system library provides
: accessor functions such as real(), etc. why?
: 3) Why it is implemented as a template?
: I would assume make it two doubles and type conversion
: can take care of int and float, etc.
: Thanks.

avatar
d*s
9
哈哈,真的
avatar
y*o
10

这是谣言

【在 d**********r 的大作中提到】
: 你这个叛徒,我告发,yelo去找卡伊去了。
avatar
t*t
11
1 class or struct doesn't matter. only difference is default accessibility.
what matters is, complex<> are "literal types". i assume this is for
compatibility and implementation convenience.
2 the default accessibility is for backward compatibility.
3 for floating point calculation, precision matters. why system provides
float, instead of letting everyone use double?

【在 r***e 的大作中提到】
: I was reading the system library of complex number
: and have some questions:
: 1) Should it be a class or a struc?
: the system makes it a struc;
: 2) Although it is a struct, the system library provides
: accessor functions such as real(), etc. why?
: 3) Why it is implemented as a template?
: I would assume make it two doubles and type conversion
: can take care of int and float, etc.
: Thanks.

avatar
n*n
12
呵呵
avatar
K*a
13
胡说! 他喜欢的是猴妈!请看下贴证据

【在 d**********r 的大作中提到】
: 你这个叛徒,我告发,yelo去找卡伊去了。
avatar
r*e
14

.
What is a 'literal type'? What is the common practice for
a 'literal type', a class or a struct?
I see.
I see, thank you.

【在 t****t 的大作中提到】
: 1 class or struct doesn't matter. only difference is default accessibility.
: what matters is, complex<> are "literal types". i assume this is for
: compatibility and implementation convenience.
: 2 the default accessibility is for backward compatibility.
: 3 for floating point calculation, precision matters. why system provides
: float, instead of letting everyone use double?

avatar
r*e
15
这人出名了

【在 n***n 的大作中提到】
: 呵呵
avatar
K*a
16
发信人: yelo (没有昵称), 信区: Military
标 题: Re: 我一来猴妈就走了
发信站: BBS 未名空间站 (Wed Feb 1 13:34:44 2012, 美东)
我嫉妒你了
avatar
t*t
17
google is your friend.

【在 r***e 的大作中提到】
:
: .
: What is a 'literal type'? What is the common practice for
: a 'literal type', a class or a struct?
: I see.
: I see, thank you.

avatar
d*s
18
哈哈,真的
avatar
y*o
19


【在 K*a 的大作中提到】
: 发信人: yelo (没有昵称), 信区: Military
: 标 题: Re: 我一来猴妈就走了
: 发信站: BBS 未名空间站 (Wed Feb 1 13:34:44 2012, 美东)
: 我嫉妒你了

avatar
N*m
20
大侠你很空啊,呵呵。

【在 t****t 的大作中提到】
: google is your friend.
avatar
t*s
21
呵呵

【在 n***n 的大作中提到】
: 呵呵
avatar
d*r
22
神,一定要制裁这个叛徒

【在 y**o 的大作中提到】
: 嗯
avatar
r*m
23
once you start get used to template, its really the wonderful thing in C++.

【在 r***e 的大作中提到】
: I was reading the system library of complex number
: and have some questions:
: 1) Should it be a class or a struc?
: the system makes it a struc;
: 2) Although it is a struct, the system library provides
: accessor functions such as real(), etc. why?
: 3) Why it is implemented as a template?
: I would assume make it two doubles and type conversion
: can take care of int and float, etc.
: Thanks.

avatar
t*s
24
呵呵

【在 n***n 的大作中提到】
: 呵呵
avatar
M*e
25
谢谢
你也好看

【在 y**o 的大作中提到】
: 今天你好看吗?
avatar
h*s
26
google得结果似乎都是在说c++0x里面规定了可以有user defined literal,没找到哪
里说complex是literal type啊
大牛有空多解释一下?

【在 t****t 的大作中提到】
: google is your friend.
avatar
e*s
27
哈哈
avatar
M*e
28
胡说
他喜欢的是马马

【在 K*a 的大作中提到】
: 胡说! 他喜欢的是猴妈!请看下贴证据
avatar
t*t
29
literal type is not user defined literal.

【在 h*******s 的大作中提到】
: google得结果似乎都是在说c++0x里面规定了可以有user defined literal,没找到哪
: 里说complex是literal type啊
: 大牛有空多解释一下?

avatar
y*o
30
你还没回答呢

【在 M**e 的大作中提到】
: 谢谢
: 你也好看

avatar
M*e
31
我今天好看

【在 y**o 的大作中提到】
: 你还没回答呢
avatar
y*o
32
知道你今天好看我很高兴
会心地微笑了

【在 M**e 的大作中提到】
: 我今天好看
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。