Re: Exponent help please Programming Software Development by ArkM ….ignore(1000,'\n'); return answer == 'y' || answer == 'Y'; } [/code] Let exponent and squareRoot functions ask user to get arguments and print… result only: [code=cplusplus] do exponent(); while (tryAgain()); [/code] Use the same approach in the main… Exponent help please Programming Software Development by gangsta gama … here is what I did: 1. Typed in E for exponent and hit enter. 2. Entered 9 and hit enter. 3… Exponent Table Programming Software Development by infiniteloop56 … what it should look like) input: Base = 2 max exponent = 3 min exponent = -2 output: .25 .5 1 2 4 8… int count1; cout << "Please enter a maxiumum exponent value" << endl; cin >> expomax…; cout << "Please enter a minimum exponent value" << endl; cin >> expow… Re: Exponent Table Programming Software Development by invisal …1; } else if (to > 0) { // positive exponent while(to > 0) { result *= base; to--; }… return result; } else { // negative exponent to = -to; while(to > 0) { result *= base; … Re: Exponent in Textbox or Label Programming Software Development by AndreRet …(31) = &H80000000 End If ' return the result Power2 = res(exponent) Text2.Text = Power2 End Function Private Sub Command1_Click() 'First check…;" Then MsgBox "Please add a number to compute exponent.", vbOKOnly + vbExclamation, "Add Integer" Text1.SetFocus … Exponent in Textbox or Label Programming Software Development by adamsn Good day all Is it possible to type an exponent in a textbox or a label using VB6? I am currenltly using two textboxes, one for the base and the other for the exponent, by using the tabkey to go from textbox 1 to textbox 2. thanx. N Re: Exponent help please Programming Software Development by ddanbe Perhaps you should define a double variable like [B]double p;[/B], then do [B]p= pow(Ex,Ey)[/B] and [B]cout << p[/B]? Re: Exponent help please Programming Software Development by gangsta gama Thank you, ArkM. I will try what you did. The compiler I am using is Dev c++ and it is not working right now, so that is why I am writing back. I have one question though... what does setprecision do? Thank you, Gangsta Gama Re: Exponent help please Programming Software Development by VernonDozier [QUOTE=gangsta gama;729489]Thank you, ArkM. I will try what you did. The compiler I am using is Dev c++ and it is not working right now, so that is why I am writing back. I have one question though... what does setprecision do? Thank you, Gangsta Gama[/QUOTE] Best way to learn is to run the example and experiment with the numbers and see… Re: Exponent help please Programming Software Development by ArkM About setprecision: [url]http://www.cplusplus.com/reference/iostream/manipulators/setprecision.html[/url] About compiler: better download and install Code::Blocks IDE. The compact distribution contains recent version of MinGW compiler: [url]http://www.codeblocks.org/[/url] Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …; break if addexp: addexp = False; exponent+=1; continue break return exponent depth=8 exponent = getexp(floats,depth) print 'int_depth =',…================================ RESTART ================================ >>> int_depth = 16 bit exponent = 6 # 11 should fit here, 6 is just … how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …float if DT==1: return bs8()/pow(2.0,exponent) # 8bit signed pseudo-float if DT==2: …return bu16()/pow(2.0,exponent) # 16bit unsigned pseudo-float if DT==3: return… bs16()/pow(2.0,exponent) # 16bit signed pseudo-float if DT==4: return… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …2 until everything is at n.0 the exponent is the number of runs the loop takes…: >>> def getexp(FL): exponent = 1 addexp = False while True: SE = …True; break if addexp: addexp = False; exponent+=1; continue break return exponent >>> getexp([ 5.09375,… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll … (multiplying the value instead of dividing it) returns a common exponent of `6` for those floats when using bu16 format, the… common exponent for bu8 is `5` as shown in my examples. a… all floats pushing them into positive bounds before finding the exponent. >_> EDIT: or I could just ignore `u… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …if f<0: signed = True; break exponent = 1 addexp = False D = ((1<…) while True: SE = pow(2.0,exponent) for F in floats: SF = abs(…break if addexp: addexp = False; exponent+=1; continue break return exponent ^if any float is signed, it… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …if I had to take a guess... just calculate the exponent until any float in the list is bigger than 65535…. if it's bigger, just subtract from the exponent and int(float_value) EDIT2: expanding on that guess, from the… code above: if int(SF)>65535: return exponent-1 and just run each float through int( value * pow… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Gribouillis > where's your common exponent to evaluate all those "ints" (the n.0 …floats) by?? Well my idea is to take the smallest exponent which yields an int for each of the floats, then… take the largest of these exponents to get the common exponent. This gives 6. > also, what's the bit-depth… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …). if they're int, the vertex/facepoint attributes specify an exponent which is applied to all vectors in the category. I…'m trying to write them, so I need the common exponent with a bunch of ints. Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll … want to write to the file `4` is the common exponent to resolve a 16bit mantissa to an 8bit mantissa (will… what's read from the file `4` is the common exponent (read from the file) `5.0625` is the result to… Re: Guys Need Some Help... What is the code for exponent in java? Programming Software Development by Alex Edwards …static double power(double value, short exponent){ if(exponent >= 0){ // if exponent is greater than or equal to…for(short i = 0; i < exponent; i++){ // doing something exponent times result = result * value; // …; // return the result }else return 0; // exponent was less than 0 - return 0 for simplicity. }… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Tcll …'s not gonna work well... heh here's an example: exponent = 11 here's a bunch of raw bs16 vert coord… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Gribouillis … is written on 64 bits, with 1 sign bit, 11 exponent bits and 52 mantissa bits. Why don't you convert… Re: how to calculate a common exponent from a bunch of float values?? Programming Software Development by Gribouillis … will screw up the result, you can keep the same exponent, I mean shorten only the mantissa from anyfloat import anyfloat… extracting exponent from polynomial using c string Programming Software Development by herious89 … to extract the value of the coeffecients and the exponent from a polynomial. I have already succeeded in extracting…strtok. I applied the same concept to find the exponent, but I don't know how to use strtok… cout << coefficient[i] << endl; } extracting exponent (it prints also the + characters, i just want the exponents… bit operations and testing for exponent of two Programming Software Development by dancks … number can fit into the square, p must be an exponent of 2. `p & ~(p & (p - 1))` fails to… differentiate non 2-exponent numbers. logically it seems to make since since base 2…; 011111 : 0. and the table is supposed to match the exponent with the power. I'm guessing that how it works… Re: separate mantissa and exponent of a double Programming Software Development by Melldrin … Dose any one know how to separate mantissa and exponent of a double and store them in two integers?…5894.349580349); boolean negative = (bits & 0x8000000000000000L) != 0; long exponent = bits & 0x7ff0000000000000L >> 52; long mantissa = bits…without making sure it fits first. The exponent is small enough. Hope that helps. Guys I need help in Java about what is the code for exponent. Programming Software Development by ocreds …;))" in PostfixEvaluator.java but it doesn't work like exponent. Can you help me to figure it out what is… the right code for exponent. [CODE=java] else if(token.equals("^")) { val1 = Integer… separate mantissa and exponent of a double Programming Software Development by hasan2003 hi every one .... thanks for comming to this thread ... Dose any one know how to separate mantissa and exponent of a double and store them in two integers? :?: Unary (-, +) , Parenthesis, Exponent. Need Help Programming Software Development by darlineth … unary function. My problem is How to organize the parenthesis , Exponent and Unary code in my downloaded codes and copy paste… Re: Unary (-, +) , Parenthesis, Exponent. Need Help Programming Software Development by darlineth … my post it's clearly and soft, Unary, parenthesis and Exponent. The code that can i post in above is proven…