bgribble@jarthur.claremont.edu (Bill Gribble) (03/13/91)
Is there any way to use units on complex numbers? I was doing some engineering-type stress calculations with coimplex numbers and was quite frustrated when I couldn't use units. When the calculations are really involved and use a lot of equations is when you *really* want to check units to see if you're right, and I can't. Is there a conceptual difficulty with complex numbers having units? I mean, is the complex number (1_m, 1_m) mathematically meaningless? Or is it just a quirk in the HP's unit management? Any advice would be appreciated. ***************************************************************************** ** Bill Gribble Harvey Mudd College, Claremont, CA ** ** bgribble@jarthur.claremont.edu Never heard of it? You're stupid. ** *****************************************************************************
billw@hpcvra.cv.hp.com. (William C Wickes) (03/14/91)
There's no conceptual problem with complex numbers with units. The 48 doesn't happen to include an object type for such things; call it a limitation rather than a quirk (remember ROM is full and life is short?). However, you can enter expressions like '(1_m,1_m)', which immediately compiles to '1_m+(1_m)*i'. That opens up lots of possibilities. Bill Wickes HP Corvallis
bgribble@jarthur.Claremont.EDU (Bill Gribble) (03/15/91)
In article <25590125@hpcvra.cv.hp.com.> billw@hpcvra.cv.hp.com. (William C Wickes) writes: >There's no conceptual problem with complex numbers with units. The >48 doesn't happen to include an object type for such things; call it a >limitation rather than a quirk (remember ROM is full and life is short?). >However, you can enter expressions like '(1_m,1_m)', which immediately >compiles to '1_m+(1_m)*i'. That opens up lots of possibilities. When I read this article, I hit 'F' and thought, 'I'm going to get to tell Bill Wickes he's wrong, because I've tried this and it doesn't work.' Of course, when I went to get my 48 just to confirm your error :-) I discovered that it does, in fact, work, with a caveat. What I had tried was something like '1_m + i*1_m', which doesn't work. The unit objects must be enclosed in parentheses to prevent evaluation of a unit object times i. It also seems that this only works if you quote the expression, and only if you explicitly insert the comma rather than leaving a space to separate the elements of the number. Hmm. I thought leaving a space was always equivalent to the separator token. I guess not. Thanks for the information - it makes complex unit objects at least possible. >Bill Wickes >HP Corvallis ***************************************************************************** ** Bill Gribble Harvey Mudd College, Claremont, CA ** ** bgribble@jarthur.claremont.edu Never heard of it? You're stupid. ** *****************************************************************************