April 25, 2003 Re: Rotation operator proposal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> wrote in message news:b8aeqr$2s7b$1@digitaldaemon.com... > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6bhbj$1tf2$1@digitaldaemon.com... > > You obviously know about rol and ror. C has non-ansi-standard __lrotl and > > __lrotr (Microsoft libraries) but hopefully D will have standard > intrinsics > > for this basic op. The only drag is that for it to be useful you need to > > know the size of the int type exactly. > > I haven't because I never know what to do with rcl and rcr <g>. D has no concept of carry, so obviously those two aren't going to fit well. I don't think the carry bit is appropriate domain for a high-level language to deal with. Not terribly portable. > > fsincos is apparently a x87-only feature (haven't seen it on any other processor yet) but it seems to be the nature of math that if you need > either > > sin or cos, you will likely need the other as well, for the same angle. > It > > makes sense for a coprocessor to compute them both at once much as it > makes > > sense to do integer div and mod at the same time. There is considerable work that doesn't need to be done twice. > > I think a better approach is for the compiler to recognize that both sin() > and cos() are being done on the same argument, and internally convert it to > fsincos. That'd be a fine solution. > > Don't ya just love the basics? > > Doing the basics well pays endless dividends. Agreed. We sure appreciate it. > Right now, getting the basic system working on linux is my priority. I'm currently studying the pthreads manual. Ahhh... pthreads. I wrapped that once and never had occasion to use it. Linux seems to be a big issue. It's definitely worth doing, because it will bring in some talented Unix people who may be willing to contribute time and/or code to the D effort. Sean |
April 25, 2003 Re: Rotation operator proposal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | I recently found this out firsthand. Sweet! Sean "Walter" <walter@digitalmars.com> wrote in message news:b8aeqr$2s7b$2@digitaldaemon.com... > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6gfj1$2h9u$1@digitaldaemon.com... > > DMD inline asm wouldn't by any chance support the P4 opcodes would it? I > > can do it the hard way if I have to. > > The DMD inline assembler supports *all* the x86 opcodes, including the AMD 3d!now ones. |
April 25, 2003 Re: Rotation operator proposal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b8as8s$3nh$1@digitaldaemon.com... > Linux seems to be a big issue. It's definitely worth doing, because it will > bring in some talented Unix people who may be willing to contribute time and/or code to the D effort. I suspect it may double or triple the D user base, as linux seems to have attracted the people who write code for fun and the early adopters. |
Copyright © 1999-2021 by the D Language Foundation